
<!-- saved from url=(0050) -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-2">
        <style>body{color:#ddddff}</style>
        <link rel="icon" type="image/png" href="http://tasker.dinglisch.net/favicon.png">
        <title>Tasker for Android</title>
<style type="text/css"></style><style type="text/css"></style></head>


<body style="color:black" bgcolor="#ddddff">

<table bgcolor="333377" cellpadding="1">

<tbody><tr align="center">
<td height="100%" valign="top">

<table cellpadding="5">

<tbody><tr bgcolor="#ddddff" align="left">


</td>
<td valign="top" height="100%">
<table cellpadding="14" cellspacing="2">
<tbody><tr>
<td bgcolor="#ffffff">

<p>
<i>
This document is a one-page compilation of the on-device userguide
intended for printing out for use as a reference.
</i>
</p><p>
<a name="index.html">

</a></p><h2><a name="index.html">
	Tasker Userguide 
	<img style="float:right" src="./Tasker for Android_files/icon_tasker.png">
</a></h2><a name="index.html">
	
</a><ul><a name="index.html">
	</a><li><a name="index.html">Profiles
		</a><ul><a name="index.html">
			</a><li><a name="index.html"></a><a href="#activity_main.html">Main Screen</a></li>
		</ul>
			
	</li><li>Contexts
		<ul>
			<li><a href="#appcontext.html">Application</a></li>
			<li><a href="#timecontext.html">Time</a></li>
			<li><a href="#daycontext.html">Day</a></li>
			<li><a href="#loccontext.html">Location</a>
			<ul>
				<li><a href="#activity_locselect.html">Location Edit</a>
			</li></ul>
			</li><li><a href="#activity_stateedit.html">State</a>
			<ul>
				<li><a href="#help/sh_index.html">A-Z</a>
			</li></ul>
			</li><li><a href="#eventcontext.html">Event</a>
			<ul>
				<li><a href="#activity_eventedit.html">Event Edit</a>
				</li><li><a href="#help/eh_index.html">A-Z</a>
			</li></ul>
		</li></ul>
	</li>

	<li>Tasks
		<ul>
			<li><a href="#tasks.html">General</a>
			</li><li><a href="#activity_taskedit.html">Task Edit</a>
			</li><li><a href="#flowcontrol.html">Flow Control</a></li>
			<li><a href="#app_widgets.html">Task Widgets / Shortcuts</a>
				<ul>
					<li><a href="#activity_widget_configure.html">Configuration</a>
				</li></ul>
			</li><li>Actions<br>
			<ul>
				<li><a href="#activity_actionedit.html">Action Edit</a>
				</li><li><a href="#settings.html">Settings</a></li>
				<li><a href="#help/ah_index.html">A-Z</a></li>
			</ul>
			
		</li></ul>
		</li>
	<li>Scenes
		<ul>
			<li><a href="#scenes.html">General</a></li>
			<li><a href="#activity_sceneedit.html">Scene Edit</a></li>
			<li>Scene Elements<br></li>
			<ul>
				<li>
				<a href="#element_button.html">Button</a>
				<a href="#element_text.html">Text</a>
				<a href="#element_textedit.html">TextEdit</a>
				<a href="#element_doodle.html">Doodle</a>
				<a href="#element_image.html">Image</a>
				<a href="#element_map.html">Map</a>
				<a href="#element_menu.html">Menu</a>
				<a href="#element_shape.html">Oval</a>
				<a href="#element_shape.html">Rectangle</a>
				<a href="#element_slider.html">Slider</a>
				<a href="#element_web.html">Web</a>
				</li><li><a href="#activity_elementedit.html">Element Edit</a></li>
			</ul>
		</ul>
	</li><li>Variables
		<ul>
			<li><a href="#variables.html">General</a></li>
		</ul>	
	</li><li>Miscellaneous
		<ul>
			<li><a href="#appcreation.html">App Creation</a></li>
			<li><a href="#beginner.html">Beginner Mode</a></li>
			<li><a href="#cpu.html">CPU Control</a></li>
			<li><a href="#encryption.html">Encryption</a></li>
			<li><a href="#gestures.html">Gestures</a></li>					
			<li><a href="#javascript.html">JavaScript</a></li>					
			<li><a href="#icons.html">Icons</a></li>
			<li><a href="#loctears.html">Location Without Tears</a></li>
			<li><a href="#maths.html">Maths</a></li>
			<li><a href="#matching.html">Pattern Matching</a></li>
			<li><a href="#power.html">Power Usage</a></li>
		</ul>
	</li>
	<li>FAQs
	<ul>
		<li><a href="#faqs/faq-how.html">How Do I... / Can I... ?</a>
       		 </li><li><a href="#faqs/faq-problem.html">Usage Problems</a>
       		 </li><li><a href="#faqs/faq-why.html">Why... ?</a>
       		 </li><li><a href="#faqs/faq-appcreation.html">App Creation</a>
       		 </li><li><a href="#faqs/faq-other.html">Other</a>
	</li></ul>
	</li>

	<li>Web Links
	<ul>
		<li><a href="http://tasker.wikidot.com/">Wiki (Step-throughs, Recipes)</a>
		</li><li><a href="http://tasker.dinglisch.net/tour.html">Tour</a>
		</li><li><a href="http://tasker.dinglisch.net/bugs.html">Bugs / Limitations</a>
		</li><li><a href="http://tasker.dinglisch.net/todo.html">Plans</a>
		</li><li><a href="http://tasker.dinglisch.net/developers.html">Developers</a>
		</li><li><a href="http://tasker.dinglisch.net/changes.html">Release Notes</a>
	</li></ul>
</li></ul>
<a name="activity_main.html">

<h2>
	Main Screen
	<img style="float:right;" src="./Tasker for Android_files/icon_tasker.png">
</h2>

This is the first screen shown when you startup Tasker. It allows you
to organize and configure Tasker's four main 'building blocks':
<i>Profiles, Tasks, Scenes</i> and <i>Variables</i>.

</a><ul><a name="activity_main.html">
	</a><li><a name="activity_main.html">Main Tabs
	</a><ul><a name="activity_main.html">
		</a><li><a name="activity_main.html"></a><a href="#profiles">Profiles</a>
		</li><li><a href="#tasks">Tasks</a>
		</li><li><a href="#scenes">Scenes</a>
		</li><li><a href="#variables">Variables</a>
	</li></ul>
	</li><li><a href="#bottom">Bottom Controls</a>
	</li><li><a href="#projects">Projects</a>
	</li><li><a href="#menus">Menus</a>
</li></ul>

<h3>Main Tabs</h3>

<ul>
	<li><b>Click</b> on a tab to view a list of the relevant things
	</li><li><b>Long-click</b> on a tab to get options
</li></ul>

<!-- __________________________ PROFILES _________________________ -->

<a name="profiles">
<h4><i>Profiles</i></h4>

Each item in the list represents a profile. The profile links contexts (conditions) on
the left to tasks which should be run on the right. The profile name is green if
the profile is active. There are three main parts to each profile.
<p></p>

<h5><i>1. Title Bar</i></h5>

<p>
This shows the profile name (or description if it has no name) and the
check-mark icon on the right shows whether the profile is enabled or not.
</p>
<p>
</p><ul>
	<li><b>Click</b> on the name to expand / collapse the profile. When expanded, the contexts and tasks (described below), are visible.
	</li><li><b>Long-click</b> on the profile name to get profile options
	</li><li><b>Click</b> on the check-mark icon to toggle whether the profile is enabled or not.
	</li><li><b>Click-and-drag</b> the area at the right side of the title bar
drag it around. Note that the enable icon can also be used for dragging.
</li></ul>

<p>Important: the check-mark does not mean the profile is <b>active</b>
(will run its tasks), it means that the profile <b>can</b> become active
<b>if</b> its conditions are met.
</p>

<h5><i>2. Contexts</i></h5>

<p>
On the left hand side of the profile are an icon and text for each context in the
profile. The contexts dictate when the profile should become active. When <b>all</b> contexts
are active then the profile will be active.
</p>

<ul>
	<li><b>Click</b> on the context to edit it
	</li><li><b>Long-click</b> to show management options, such as editing or adding a new context
</li></ul>

<p>
You can configure what clicks and long-clicks on contexts do in <code>Menu / Prefs / UI</code>.
</p>

<h5><i>3. Tasks</i></h5>
<p>
On the right hand side of the profile are one or two tasks to
carry out based on its activation status.
</p>
<ul>
	<li><b>Click</b> on the task to edit it
	</li><li><b>Long-click</b> to show management options. 
</li></ul>
<p>
A task indicated with a <b>green, right-pointing</b> arrow is an
<i>entry</i> task, executed when the profile first becomes active.
</p>
<p>
A task indicated with a <b>red, left-pointing</b> arrow is an
<i>exit</i> task, executed when the profile becomes inactive again.
</p>
<p>Exception: a profile containing an event context or a repeating
or non-ranged time context has two green
arrows, to denote that both tasks are executed immediately because
the profile activation and deactivation is instantaneous.
</p>

<!-- __________________________ TASKS  _________________________ -->

</a><a name="tasks">
<h4>Tasks</h4>

The task list shows the named </a><a href="#tasks.html">tasks</a> which have been created.
<ul>
	<li><b>Click</b> on a task to edit it
	</li><li><b>Long-click</b> for options
	</li><li><b>Click-and-drag</b> at the right hand side to drag the task (e.g. to the trash bin)
</li></ul>

<p>
Note that a profile can be assigned an <i>anonymous</i> task (one without
a name) which is not accessible in the task list, only via the
relevent profile in the profile list.
</p>

<!-- __________________________ SCENES  _________________________ -->

<a name="scenes">
<h4>Scenes</h4>

The scene list shows the </a><a href="#scenes.html">scenes</a> which have been created.
<ul>
	<li><b>Click</b> on a scene to edit it
	</li><li><b>Long-click</b> for options
	</li><li><b>Click-and-drag</b> at the right hand side to drag the scene (e.g. to the trash bin)
</li></ul>

<p>Scenes marked with a star icon have been created but may be visible or invisible.</p>

<!-- __________________________ VARIABLES  _________________________ -->

<a name="variables">
<h4>Variables</h4>

<p>The Variables tab is not shown if <code>Menu / Prefs / UI / Beginner Mode</code> is enabled.</p>

</a><p><a name="variables">By default, all global </a><a href="#variables.html">user-variables</a> that Tasker knows about are listed, which includes any that have a value set or are mentioned somewhere in a profile or task.
</p>
<ul>
	<li><b>Click</b> on a variable to edit it
	</li><li><b>Long-click</b> for options
</li></ul>
<p>
Note that variables whose names are all lower-case are <i>local</i> variables and not shown because they are only valid within the task that refers to them.
</p>

<p>
At the bottom of the variable list is an upwards-pointing faded arrow.
It can be dragged up to show variable filter controls.
</p>
<ul>
        <li><b>Indexed</b> (button)<br>includes variables whose names end in a number e.g. <code>%LOC3</code>, otherwise they are excluded.
        </li><li><b>Empty</b> (button)<br>includes variables which have currently have no value assigned, deselect to show only variables that have a value.
        </li><li><b>Referenced</b> (button)<br>includes variables which are referenced in profiles or tasks.<br>Deselect to show 'orphan' variables.
        </li><li><b>Filter</b> (textbox)<br>excludes variables which don't contain the specified text somewhere in their name (case-sensitive)
</li></ul>

<p>
Unlike most screens in Tasker, changes made in the variable list cannot be cancelled.
</p>

<a name="bottom">
<h4>Bottom Controls</h4>

<h5><i>Cancel</i> Button</h5>

Discard all changes to user data that have been made 
since starting the Tasker UI.

<h5><i>Accept</i> Button</h5>

Apply the changes that have been made since last starting the Tasker UI.
Pressing the Back hardware button has the same effect. Home has the same
effect unless a dialog is showing.

<h5><i>Plus</i> Button</h5>

<p>
Create a new Profile, Task, Scene or Variable, depending on the current tab.
</p>

<h5><i>On/Off</i> Toggle</h5>

Tasker does not do anything when you leave the user inteface, unless
this button is set to <i>On</i> (green light showing). When you set
it to off, Tasker's event monitor is immediately stopped if it was 
previously running.

<!-- -------------------------- PROJECT TABS --------------------- -->
</a><a name="projects">
<h3>Projects</h3>

<p>
Tasker allows organisation of profiles, tasks, scenes and variables
into groups called <i>Projects</i>, each with a separate <i>Project Tab</i>.
</p>
<p>The projects tabs are accessed by dragging entity tabs down
via the faded arrow just underneath them. Drag the other way
to hide them.
</p>
<p>If no arrow is there, you probably need to disable <code>Menu / Prefs / UI / Beginner Mode</code>.
</p>

<ul>
	<li><b>Click-and-drag</b> a profile, task or scene to a project
tab to move it to that project
	</li><li><b>Click</b> on a project tab to switch to viewing only
things in that project
	</li><li><b>Long-click</b> on a project tab for options, including
adding a new tab
</li></ul>

<p>The first tab has a slightly special status, it cannot be removed
and anything which is not a member of another project is placed there.
</p>

<!-- -------------------------- MENUS --------------------- -->
</a><a name="menus">
<h3>Menus</h3>

<h4>Menu Item: Browse Solutions</h4>

Links to websites with projects, profiles etc offering solutions for common 
problems.  Important: once downloaded you need to import the file into
your active user data. For example, profiles are imported by long-clicking
the profile tab and selecting Import.

<h4>Menu Items: Data</h4>

<h5>Clear</h5>

Removes all data that has been created to that point. Does
not remove preferences (use <code>Menu / Preferences</code> and click <b>Defaults</b> for
that) or variables (long-click on the Variables tab for that).

<h5>Backup</h5>

Saves the existing user data to a backup file on the SD card (if present).
The file is <code>/sdcard/Tasker/userbackup.xml</code>.

<h5>Restore</h5>

Replaces the existing profile configuation with that from the SD card.

</a><a name="appcontext.html">

<h2>
	Application Context
	<img style="float:right" src="./Tasker for Android_files/icon_tasker.png">
</h2>

An <i>Application Context</i> is activated when the selected application is running
in the foreground and deactivated otherwise.
<p>
The button in the bottom right indicates whether the context is <i>inverted</i>
or not. If the button is <b>lit-up</b>, this context will become active when any
application <b>apart from</b> the selected one is launched.
</p>

<h4>Application Checking</h4>

When any profiles have application contexts specified, Tasker checks frequently
to see if one of those applications has been launched. The default is every
1.5 seconds.
<p>
If you would like quicker response, or you suspect this is severely increasing
your battery usage, you can change this value in preferences
(select <code>Menu / Preferences / Monitor</code> from the main screen).
</p>
</a><a name="timecontext.html">

<h2>
	Time Context
	<img style="float:right" src="./Tasker for Android_files/icon_tasker.png">
</h2>

<p>
A <i>Time Context</i> specifies a particular range, or one (or more) points in time.
There are three major components in the selection dialog, one of which must be selected (by enabling
its checkbox on the left):
</p>

<ul>
	<li><b>From Time</b>: the starting time of the range. If it's not specified,
	<b>00:00</b> is assumed.
	</li><li><b>To Time</b>: the end time of the range. If it's not specified, <b>11:59</b>
	is assumed.
	</li><li><b>Repeat</b>: if no repeat is selected, the context is assumed to be
	a continuous range which starts at <i>From Time</i> and ends at <i>To Time</i>.
	If a repeat <b>is</b> specified, the first occurrence is at <i>From Time</i> and then
	every X hours or minutes until <i>End Time</i>.
</li></ul>

<p>
Notes:
</p>
<ul>
	<li>to specify a precise time, set <i>From</i> and <i>To</i> times the same. In that case, the context is treated as an instant event,
	it it only active for a fraction of a second, so no setting restoration is done.
	</li><li>each repeat (if <i>Repeat</i> is set) is also treated like an instant event.
</li></ul>
</a><a name="daycontext.html">
<h2>
	Day Context
	<img style="float:right" src="./Tasker for Android_files/icon_tasker.png">
</h2>

A <i>Day Context</i> allows specification of one or more months and/or days of the
week/month.

<h4>Month Specification</h4>

The months are listed at the top, any of which can be selected. Selecting <b>no</b>
month has the same meaning as selecting <b>every</b> month i.e. has no restriction
on when the profile will become active.

<h4>Day of Week/Month Specification</h4>

Days of the week (<i>Sunday, Monday</i> etc) and/or month (<i>1st, 9th</i> etc) can be selected
independently with the pulldown centre-right. This will initially be for Week Days if
there are any defined, otherwise Month Days.
<p>
Selecting <b>no</b> day has the same meaning as selecting <b>every</b> day.
</p>
<p>
If you select <b>both</b> days of the week <b>and</b> days of the month, it requires both
conditions to be fulfilled for the profile to become active 
e.g. selecting <i>Mon,Tue</i> and <i>11th</i> means the profile will become active when the
day is a <i>Mon</i> or <i>Tuesday</i> and <b>simultaneously</b> the <i>11th</i> day of the month.
</p>

<p>
If you are unsure if you have specified the day(s) you require, click the <b>Done</b>
button and you will see a verbal description at the top of the Profile Edit screen.
You can click on this to try again if it's not correct.
</p>

</a><a name="loccontext.html">

<h2>
	Location Context
	<img style="float:right" src="./Tasker for Android_files/icon_tasker.png">
</h2>

<p>
A <i>location context</i> specifies a circular geographical area in which
it is active. It is formed by a centre point (<i>latitude, longitude</i>) plus
a <i>radius</i> around that point.
</p>

<h4>Location Providers</h4>

A location provider is a method of supplying geographical coordinates. Tasker must
use one or more location providers to be able to decide when a location context
should become active or inactive.

</a><a name="gps">
<h5>GPS</h5>

<p>
The most accurate provider available (around +-10m), but its performance degrades quickly
indoors and it uses a relatively large amount of power. 
</p>
<p>
To set the frequency of GPS fixes, see <code>Menu / Preferences / Monitor</code>.
<i>GPS Check Time</i> determines the check frequency in seconds while the device
is awake, <i>Off Check Time</i> while the device is asleep.
</p>
<p>
GPS will only be used for a particular context if it is specified in the location
edit screen.
</p>

</a><a name="net">
<h5>Network</h5>

This provider uses a combination of cell-towers
and WiFi information (if wifi is enabled) to determine the device's geographical location. It is
less power-hungry than GPS, but also less accurate (sometimes +- several kilometres)
 and requires data network availability.
<p>
Network will only be used for a particular context if it is specified in the location
edit screen.
</p>

See also:

</a><ul><a name="net">
	</a><li><a name="net"></a><a href="#activity_locselect.html">Location Edit Screen</a>
	</li><li><a href="#loctears.html">Location Without Tears</a> (guidance for choosing a location method)
</li></ul>

<a name="activity_locselect.html">
<h2>
	Location Edit
	<img style="float:right" src="./Tasker for Android_files/icon_tasker.png">
</h2>

This screen allows configuration of a </a><a href="#loccontext.html">Location Context</a>.

<h4>Map Display</h4>

The map shows:

<ul>
	<li>The location (base of the flag icon) and names of all defined location contexts
	</li><li>The radius of the location currently being defined (the inner circle)
</li></ul>

<p>
Location contexts other than the one currently being defined have a small fixed-radius bluish
base.
</p>

<h4>Map Controls</h4>

<p>
Use a <b>long-click</b> on the map to select a location for this context.
</p>
<p>
Use the pull-down selector under the map to specify the radius
for this context.
</p>
<p>
<b>Important:</b> if your radius is too small compared to the accuracy of
the fixes you are receiving, your context may never go active. If you can't get
a fix, try increasing the radius. Typically, a good radius would be around twice the
accuracy of the fixes you are receiving.
</p>
<p>Tap on the map to bring up zoom controls and buttons to enable the Satellite
Overlay (left) and Street View (right). Note that the Street View sometimes does
not update until the map is dragged slightly.
</p>
<p>
If you have no internet available in order to retrieve the map tiles, you can still use
the <b>Get Fix</b> button (see below) to specify your current location.
</p>

<h4>Bottom Buttons</h4>

<h5>Net Button</h5>

The Net toggle button specifies whether to use the 
<a href="#net">Network</a> location provider
to monitor for this location 

<h5>GPS Button</h5>

The GPS toggle button specifies whether to use 
<a href="#gps">GPS</a>
 to monitor for this location
(assuming it is available on the device). If GPS is not used, the network will need
to be available in order to query for location fixes based on cell-towers or WiFi
data.

<h5>Get Fix Button</h5>
<p>
Acquires a location fix using the enabled and available providers (make sure the GPS
Button is clicked first if you want to use GPS).
</p>
<p>
Once a fix is acquired, the latitude, longitude and radius of this location context
are set according to it. If you reduce the radius after a fix, Tasker may no longer
accurately detect whether you are in or out of the context.
</p>
<p>
When trying to determine current location, Tasker will keep going with fixes until they stop improving (e.g. as the
GPS locks on to more satellites). If you get impatient you can press the Get Fix button
again to stop the process (its label is changed to <b>Stop</b> while a fix is being
acquired).
</p>
<a name="activity_stateedit.html">
<h2>
	State Context
	<img style="float:right" src="./Tasker for Android_files/icon_tasker.png">
</h2>

A <i>State Context</i> allows specification of the continuing state
of a software or hardware entity.
<p>
The State Edit screen allows configuration of the state and its
parameters.
</p>

<h4>State Name</h4>

The name of the state is given at the top of the screen.
Clicking on it allows changing to another state type.
<p>
Next to the name is a button to show help for the
displayed state type and its parameters. Be sure to check the 
help text if you have trouble with a particular state.
</p><p>

</p><h4>State Parameters</h4>

<h5>General Parameters</h5>

All states have parameters to specify more details about the state.

</a><p><a name="activity_stateedit.html">
Text parameters are treated as </a><a href="#matching.html">pattern matches</a>.
</p>

<h5>Invert Parameter</h5>

All states have an <i>invert</i> parameter, which specifies that the context should
become active when it would usually be inactive, and vice-versa.

<a name="eventcontext.html">
<h2>
	Event Context
	<img style="float:right" src="./Tasker for Android_files/icon_tasker.png">
</h2>

An <i>Event Context</i> allows specification of an event
which is needed to activate its profile e.g. SMS received,
screen has gone off.
<p>
Events are a little different to other contexts because they
are <i>instantaneous</i> whereas other contexts usually have
a duration.
</p>
</a><p><a name="eventcontext.html">
This means that it is nonsensical to specify that e.g. the
screen brightness should be set to X for the duration of the
event, so Tasker assumes that all </a><a href="#settings.html">settings</a>
actions should persist beyond the event.
</p>
<p>
For more information about specifying events, see
the <a href="#activity_eventedit.html">Event Edit screen</a>.
</p>

<h4>Event Parameters</h4>

When a task is triggered by an event, the parameters of the event that
ocurred are passed to the task so that it can make decisions based
on the event details.
<p>
The parameters are passed in the <a href="#arrays">array</a>
<i>%evtprm</i>.
</p>
<p>
The order of elements of the array have values which match the order
of the parameters of the event.
</p>

<p>Example: if an event's second parameter is an Application, %evtprm2 
in the launched task will be set to the label of the application 
which triggered the event.
</p>

<a name="activity_eventedit.html">
<h2>
	Event Edit
	<img style="float:right" src="./Tasker for Android_files/icon_tasker.png">
</h2>

This screen allows configuration of an </a><a href="#eventcontext.html">Event Context</a>.

<h4>Event Name</h4>

The name of the event is given at the top of the screen.
Clicking on it allows changing to another event type.
<p>
In the top right is a button to show help for the
displayed event type.
</p><p>

</p><h4>Priority</h4>

Only present for relevant events.
<p>
Selects the priority at which this event will be detected.
An event can be processed by other Tasker Profiles, other
installed applications and system processes.
</p>
<p>
If priority is high, then this profile will be more likely
to detect the event before other processes, and vice versa.
</p>

<h4>Stop Event</h4>

Only present for relevant events.
<p>
If checked, then once this profile has dealt with the event,
other user or system applications will no longer be able to
see it.
</p><p>
You can achieve different effects by combining <i>Priority</i>
and <i>Stop Event</i>. For instance, if you want to show a Tasker menu
when the camera button is pressed, you would set <i>Priority</i> <b>High</b>
and check the <i>Stop Flag</i>, because you do not want the 
camera application to appear afterwards.

</p><h4>Event Parameters</h4>

<p>
Some events have paramaters to specify more details about the event.
To get help on particular parameters, click the question-mark icon
at top right.
</p>

<p>
Text parameters are treated as <a href="#matching.html">pattern matches</a>.
</p>

<p>
If you would like to make more complex comparions (e.g. mathematical expressions), leave the event parameter
blank and instead put a <a href="#condition">condition</a> on the first
action of the task you execute with the profile.
</p>

<a name="tasks.html">

<h2>
	Tasks
	<img style="float:right" src="./Tasker for Android_files/icon_tasker.png">
</h2>

A task is simply a set of actions which are performed one after the other.

<h4>Named / Anonymous Tasks</h4>

A task can be given a name. This allows:
</a><ul><a name="tasks.html">
	<li>the same task to be used in more than one profile</li>
	<li>easier identification of what the task does</li>
	</a><li><a name="tasks.html">in the case of a </a><a name="app_widgets.html">task widget/shortcut</a>, 
	it provides a label	for the icon on the home screen.</li>
</ul>

<p>
When creating a profile, widget or shortcut, 
often the associated task will consist only of one or two actions which will not
be reused. For this case, Tasker allows you to create a task without a name
(an <i>Anonymous</i> task).
</p>

<h4>Task Visibility</h4>

Anonymous tasks are only visible when editing the profile that they are associated
with. 
<p>
Named tasks are visible on any screen that allows task editing.
Any changes made to the set of tasks in any screen is reflected in all the other
screens.

</p><h4>Task Icon</h4>

Each task has an associated icon, by default a question mark. The icon is used

<ul>
	<li>to represent the task on the home screen when it is used as a
<a name="widgets.html">widget or shortcut</a>
	</li><li>when the task is <a href="#appcreation.html">turned into and app</a>
	</li><li>for easier identification of the task within the Tasker UI
</li></ul>

<h4>Deleting Tasks</h4>

Named tasks can only be deleted via the <i>Delete</i> button on the
<a href="#activity_taskedit.html">Task Edit</a> screen. Unnamed tasks
are deleted automatically when the profile they are part of is deleted,
or a named task is selected for that profile.

<p>
Named tasks cannot be deleted while a profile still refers to them.
</p>
<p>
When a task is deleted that is referred to by a previously created named
widget or task, the widget will stop working.
</p>
<p>
Android does not allow Tasker to automatically remove the widget from the
Home Screen.
</p>

<a name="scheduling"></a>
<h4>Task Scheduling</h4>

When there is a single task waiting to be executed, it's actions are executed one-by-one
until finished.

<p>
When there are several tasks in the queue at once, it's important to understand
how they are handled:
</p>
<ul>
	<li>only <b>one action</b> from the same <a href="#actiongroups">action group</a> can be executed at once to
	prevent interference
	</li><li>the task in the queue with the <b>highest priority</b> goes first and blocks lower priority tasks
	</li><li>tasks with the <b>same priority</b> take turns executing an action
	each, starting with the most recent addition to the queue
</li></ul>

<p>
Task priority, 0 to 10 inclusive with 0 being lowest, is determined according to whatever causes the task to run.

</p><ul>
<li>tasks run by profiles have the priority specified in Profile Properties, the default is 5
</li><li>tasks run by <b>widgets</b> or <b>shortcuts</b> can be set in <code>Menu / Prefs / Action</code>, the default is 7
</li><li>tasks run from scene elements have priority <b>one more</b> than the task which showed the scene
</li><li>tasks run from the <b>Test</b> button in the task edit screen have priority 10
</li></ul>
 
<p></p>
A couple of guidelines are:
<ul>
<li>if you want a particular task to always interrupt other tasks that may be
executing, give it a high priority
</li><li>if you have a task that lasts for a while,
you probably want to give it a low priority so it doesn't block other tasks
from being executed.
</li></ul>

<a name="actiongroups"></a>
<h4>Action Groups</h4>

Actions are divided into groups for scheduling based on how long the action takes to execute and what it
interferes with:

<ul>
	<li><b>Speech</b>: <code>Say, Say To File</code>
	</li><li><b>Javascript</b>: <code>Javascript</code>
	</li><li><b>Fix</b>: <code>Get Location</code>
	</li><li><b>Voice</b>: <code>Get Voice</code>
	</li><li><b>Proxy</b>: <code>Display Brightness, Query Action, Photo, Photo Series, Photo Series Time</code>
	</li><li><b>Proxy Scene</b> Enter Key, Menu, Popup, Popup Task Buttons, Variable Query
	</li><li><b>Other Scenes</b>: the name of the scene being shown
	</li><li><b>Normal</b>: all other actions
</li></ul>

<h4>Wait Actions</h4>
<p>
<code>Wait</code> and <code>Wait Until</code> are special cases. The rules for handling them are complicated
and try to do the 'best thing' dependent on the situation.
</p>

<h4>Same-Profile Tasks</h4>

Tasks launched by the same profile by default always execute in the order in which they are launched. Other tasks from the same profile remain completely inactive until any previous task from the same profile is complete. The main purpose of this rule is to correctly handle rapid changes in a profile's activation state.
<p>
This behaviour can be disabled by deselecting <i>Enforce Task Order</i> in the Profile Properties dialog.
</p>

<h5>Example</h5>

This example demonstrates the effect of Enforce Task Order and shows also how sub-tasks launched by
<a href="#help/ah_run_task.html">Perform Task</a> are handled.
<pre>Profile: Example
Enter Task: Enter1
   Perform Task, Enter2
Exit Task: Exit1
   Perform Task, Exit2
</pre>

<b>With</b> Enforce Task Order:

<p>
Enter1 and Enter2 are both guaranteed to finish before either of Exit1 or Exit2. Whether Enter1 or
Enter2 finishes first depends on their relative priority. Same for Exit1 and Exit2.
All 4 tasks compete based on priority against tasks from other profiles. Exit tasks have a higher base
priority so will finish before Enter tasks.
</p>

<b>Without</b> Enforce Task Order:

<p>
If the profile goes active and inactive quickly, Enter1, Enter2, Exit1 and Exit2 will all compete
purely on priority. Since Exit tasks have higher base priority, Exit1 and Exit2 will probably finish first.
</p>

<a name="collisions"></a>
<h4>Collisions</h4>

Sometimes a task needs to be executed of which a copy is already executing.
This can happen quite often e.g. when a task widget button is pressed twice quickly,
or a task contains a Wait action or shows a dialog.
<p>
The way in which a collision is resolved is specified by the user. There are
3 options:
</p>

<ul>
	<li>the <b>new</b> task is ignored (the default)
	</li><li>the <b>existing</b> task is aborted and the new one starts from its first action.
	The current action of the previous task is finished if it is already being carried out.
	</li><li>both tasks run simultaneously
</li></ul>

<p>
Note that the last option can lead to several copies of a task all running at once.
</p>

<a name="stayawake"></a>
<h4>Behaviour When Device Off</h4>

By default, after a few seconds of the screen being off Android will power down the device and thus running
tasks will be paused.
<p>
In the Task Properties dialog, it can be specified that a task should keep running.
</p>

<h5>Dialogs</h5>

An action that shows some kind of dialog (such as a lock screen, popup, menu) 
blocks execution of any other action, even one of higher priority, until it is completed.

<h5>Wait / Wait Until</h5>

These are exceptions. A wait action can be interrupted by another task's action and
will resume (if necessary) when the other task's action is finished.

<h4>Killing Tasks</h4>

If you have a problem with a task that never ends, you can manually end tasks
with the <b>Kill</b> button in the Task Edit screen.

<a name="activity_taskedit.html">
<h2>
	Task Edit
	<img style="float:right" src="./Tasker for Android_files/icon_tasker.png">
</h2>

</a><p><a name="activity_taskedit.html">
This dialog allows editing and deletion of a </a><a href="#tasks.html">task</a>.
</p>

<h4>Action List</h4>

The main part of the screen is a list of the actions contained in the currently
selected task.

<ul>
	<li><b>Click</b> on an action to edit it
	</li><li><b>Long-click</b> on an action for options
	</li><li><b>Click-and-drag</b> at the right hand side of the action to move it around e.g. to the trash bin
</li></ul>

<p>On the right of each action is an icon stipulating whether the
action is a setting or not. See <a href="#settings.html">here</a> for
more information.
</p>

<h5>Condition and Block Colours</h5>

<p>If an action has had a condition set for it, the condition is shown with
a red or green bar next to it; <b>green</b> indicates that the condition is currently met (the action will execute), <b>red</b> indicates the opposite. Of course, when the task is executed it could be that it changes things so that the condition is then met.
</p>

<p>If an action is within an <code>If / End If</code> block it is displayed
indented with a red or green margin. The colours have the same significance
as for individual action conditions described above.
</p>

<p>
If an action is within a <a href="#for">For loop</a> it
is displayed indented with a <b>grey</b> margin. If the <code>For</code> 
action has a condition on it which is not met, the margin will be <b>red</b>
(because the actions in the loop will never execute, like an <code>If / End If</code> block).
</p>

<h4>Task Control Row</h4>

Directly underneath the action list is a row of buttons with icons.

<ul>
	<li><b>Add Action</b>: add an action on the end of the task.
	</li><li><b>Task Properties</b>: show extended properties for the task.
	</li><li><b>Task Icon button</b>: shows the icon associated with the task. Clicking on it
	allows changing of the icon.
</li></ul>

<h4>Bottom Row Buttons</h4>

<h5>Test Button</h5>

<p>
Run the task. Be aware that if the Task e.g. loads another
activity, you must return to Tasker and press save otherwise all changes made
while in the Task Edit screen will be lost.
</p>
<p>
Tasks run via the Test button have priority <b>10</b>.
</p>

<h5>Kill Button</h5>

This button in the bottom right will stop all running tasks. It is not
displayed if there are no running tasks.

<h4>Menu Items</h4>

<h5>Action Labels</h5>

Toggle display of action labels (which are specified in the <a href="#activity_actionedit.html">Action Edit</a> screen).

<h5>Param Names</h5>

Toggle display of the name of each action parameter.

<h5>Icons</h5>

Toggle display of the setting/action indicator icon for each action.

<a name="activity_actionedit.html">
<h2>
	Action Edit
	<img style="float:right" src="./Tasker for Android_files/icon_tasker.png">
</h2>

This screen allows configuration of a single action in a Task.

<h4>General</h4>

At top left is the name of the action. Tapping on this allows it
to be changed.
<p>
Bottom-right is a help button. Please be sure to read the action help
of every action before you use it for the first time, there may be e.g. device specific restrictions you should know about.
</p>

<h4>Action Parameters</h4>

A <i>parameter</i> gives extra detail about how the action is to be carried out.

<h5>Text Parameters</h5>

</a><ul><a name="activity_actionedit.html">
	<li>are sometimes optional: in that case the text <i>Optional</i>
will appear as a hint unless the entry box has already been filled in
	</li><li>sometimes have a dialog to help you fill in a value
	which you can access by clicking the magnifying glass icon next to them
	</li></a><li><a name="activity_actionedit.html">can have </a><a href="#variables.html">variables</a> automatically inserted by clicking the tag
	icon next to them.
</li></ul>

<h5>Numeric Slider Parameters</h5>

Clicking the arrows icon next to numeric sliders allows you to specify the
number textually or use a <a href="#variables.html">variable</a> for the parameter instead, if the value
will not be known until the action is actually executed.

<h5><i>If</i> (Condition) Parameter</h5>

<i>(most actions)</i>

<p>
Allows specification of a condition which must match if
this action is to execute.
</p>
<p>Please see the section on <a href="#flowcontrol.html">Flow Control</a> for more information.
</p>

<h5><i>Continue Task After Error</i> Parameter</h5>

<i>(selected actions only)</i>
<p>
By default, if an action fails with an error (e.g. the user specified to delete a file that doesn't exist)
Tasker will stop the task immediately and the remaining actions will never be executed.
</p>
<p>
This parameter specifies that the task should continue even if this action fails.
</p>
<p>
In addition, if it's checked, errors will be logged in the system log as diagnostics instead of errors
and error popups will be surpressed.
</p>

<h5><i>Label</i> Parameter</h5>

<i>(all actions)</i>

<p>
A label for the action which is shown on the Task Edit screen. This parameter
could also be used to add comments to actions to help understand 
how the task works.
</p>
<p>
Labels are also used with <code>Goto</code> actions to jump from one part of
the task to another.
</p><p>

<a name="scenes.html">
</a></p><h2><a name="scenes.html">
	Scenes
	<img style="float:right" src="./Tasker for Android_files/icon_tasker.png">
</a></h2><a name="scenes.html">

<h3>Introduction</h3>

<p>
A <i>scene</i> is a graphical user-interface consisting of a collection of <i>elements</i> to which tasks can be attached to be run when the user interacts with them e.g. by tapping them.
</p>

<p>
Tasker uses scenes for things like popup dialogs, menus and getting input from the
user but scenes can actually be displayed by the user whenever desired, meaning
they can be used for things like creating simple user-designed applications or showing extra controls over the top of (selected) existing applications.
</p>

</a><p><a name="scenes.html">
Scenes are completely user-customisable via a drag-and-drop graphical </a><a href="#activity_sceneedit.html">editor</a>.
</p>

<h3>Displaying Scenes</h3>

<h4>Actions: <code>Enter Key, HTML Popup, Lock, Menu, Popup, Popup Task Buttons</code> and 
<code>Variable Query</code></h4>

These actions use a <b>built-in scene</b> with the same name as their action.
After creating a task with such an action, the associated scene can be found
under the <b>Scenes</b> tab on the main Tasker screen. That scene can be edited so that
e.g. all <code>Popup</code> actions have the same style because they all use the same scene.
<p></p>

<p>The parameters specified in the action are applied to the scene before it
is show. For instance, if the scene has a <i>Title</i> element it will be
set to the title specified in the action and the scene resized appropriately.
</p>

<p>
It might be desirable to have a different style for e.g. some <code>Popup</code> actions, in which case:
</p>

<ol>
<li>clone the built-in scene long-clicking on it in the <b>Scenes</b> tab 
</li><li>edit the clone to change the contents
</li><li>in a <code>Popup</code> action, specify that the cloned scene should be used
by clicking on the <b>Layout</b> parameter in the action edit screen.
</li></ol>
<p></p>

<h4>Scene Category Actions: <code>Create Scene, Show Scene, Hide Scene, Destroy Scene</code></h4>

These allow a completely free hand over when a scene should be displayed and it's
life-cycle. They all act on scenes pre-designed in the <b>Scenes</b> tab.

<p>
Usually, only <code>Show Scene</code> and <code>Destroy Scene</code> will be
used, however sometimes it's useful for a scene to be created but not visible to
the user:
</p>

<ul>
<li>by hiding a scene instead of completely destroying it, the settings of the elements
are retained for next time it is shown
</li><li>the values of the elements in the scene can be changed to track certain
events so that the scene can be immediately displayed when required without any
configuration
</li></ul>

<h3>Scene Elements</h3>

Each scene is comprised of a number of elements.

<p>
An element has three main components:

</p><h4>Geometry</h4>

It's size and position on the screen. An element's geometry is specified in 
the <a href="#activity_sceneedit.html">scene editor</a>.

<h4>Content</h4>

How it looks on the screen. 

<p>
Specified under the <b>UI</b> tab in the element editor. Some
elements also have a Background tab. A Menu element has an additional Items tab.
</p><p>

</p><h4>Event Tasks</h4>

What should happen when the user interacts with the element.

<p>
Specified under the right-most tabs after clicking on the element in the element editor.
There are different events depending on the type of element. For instance, a Button has
tap and long-tap events while a Slider has a value-set event.
</p>

<p>Event tasks are run at priority one higher than the task which displayed the scene
</p>
<p>Local variables set by event tasks are visible to all tasks in the same scene.</p>

<h3>Scene Element Actions</h3>

In the <b>Scenes</b> action category, there are several actions for setting
the properties of scene elements. You can use these for a wide variety 
of purposes e.g.

<ul>
<li>when a slider value is set, change the zoom of an associated map element
</li><li>set the size of an element depending on current light level
</li><li>animate elements around a scene
</li></ul>

<p>
Note that actions that affect scene elements can only be used when the scene has
already been created (via <code>Create Scene</code> or <code>Show Scene</code>).
The scene does not have to be visible.
</p>

<a name="activity_sceneedit.html">
<h2>
	Scene Edit
	<img style="float:right" src="./Tasker for Android_files/icon_tasker.png">
</h2>

<p>
The scene editor is used for designing custom scenes.
</p>

The editor consists of three areas:

<h3>Display Area</h3>

The main part of the editor, where the position and size of elements are arranged.
The display area has two modes dependent on the setting of the magnifying glass icon in the corner.

<h4>Preview Mode</h4>

This mode shows the scene as it will appear when displayed.

<ul>
	<li>Click-and-drag on the <b>edge</b> of the scene to resize it
</li></ul>

<h4>Editing Mode</h4>

This mode is zoomed to make editing easier.

<ul>
	<li><b>Long-click</b> on an <b>empty</b> area to create a new element positioned there
	</li><li><b>Long-click</b> on an <b>element</b> to get options for the element
	</li><li><b>Click</b> on an <b>element</b> to edit it.
	</li><li><b>Click-and-drag</b> on the <b>centre</b> of an element to move it
	</li><li><b>Click-and-drag</b> on the <b>edge</b> of an element to resize it
</li></ul>

<p>
When moving and resizing, the sides of elements are snapped to a grid to make alignment
easier. The grid size is unique to each scene and can be changed via <b>Menu / Grid Size</b>.
</p>

<h3>Tool Bar</h3>

<h4>Undo</h4>

Allows undo of all operations, up to 20 steps in the past.

<h4>New Element</h4>

Create a new element in the <b>middle</b> of the scene. Useful if the scene is already
cluttered with a lot of elements so there is no free space.

<h4>Touch Mode</h4>

There are three touch modes which decide the effect of taps on the
display area. <i>Normal Mode</i> is described above. <i>Move Mode</i> is intended to make it easier to reposition elements. <i>Resize</i> mode
is for making resizing easier. 

<h3>Menu Options</h3>

<h4>Background Colour</h4>

A complex background can be set by long-tapping an element and specifying it as 
the </a><a href="#back">background element</a>. If a uniform colour is sufficient, it can also
be specified with this menu option.

<p>
However, there is a special case where it's a good idea to specify a background colour even
if you already have a background element. A scene is resized to fit the container
 into which it's placed, but in some cases (e.g. when it is shown as a full screen activity) there will be margins left on one
side of the container because the <i>aspect ration</i> of the scene
(the relative size of its width and height) of a scene is never changed. In such a
case, the margins are coloured with the background colour specified here.
</p>

<h3>Element Long-Click Options</h3>

<a name="back">
<h4>Set Background</h4>

An element which is set as the scene background is resized to always fill the whole scene
and interferes less with selection of other elements. To reverse this, long-tap on it and
select <b>Set Foreground</b>.

<h4>Pin</h4>

When an element is positioned satisfactorily, it can be pinned to make it easier to
select and manipulate other elements. To reverse this, long-tap on it and select
<b>Unpin</b>.

<h4>Set Depth</h4>

Each element has a particular depth which is unique to it. Deeper elements are obscured
by shallower elements which overlap them.

<h3>Orientation</h3>

<p>
The geometry (<b>position</b> and <b>size</b>) of each element can be configured independently for
portrait and landscape display orientations by rotating the device to the desired
orientation in the editor.
</p>

<p>
If no geometry is configured for a particular orientation when the scene is displayed, Tasker will attempt to
fit the elements into the scene based on the geometry of the elements in the other orientation.
</p>

</a><a name="element_button.html">

<h2>
	Scene Element: Button
	<img style="float:right" src="./Tasker for Android_files/icon_tasker.png">
</h2>

<h4>About</h4>

A standard Android button enhanced to allow display of an icon, text or
both.

<h4>Parameter: Position</h4>

If both a <i>Label</i> and <i>Icon</i> are specified, the <i>Position</i> parameter refers to 
the position of the <i>Label</i>. The <i>Icon</i> is then placed opposite the <i>Label</i>.
<p></p>

<h4>Events</h4>

</a><ul><a name="element_button.html">
</a><li><a name="element_button.html"></a><a href="#tap">Tap, Long Tap</a>
</li></ul>

<h4>Related Actions</h4>

<ul>
<li><a href="#help/ah_scene_element_text.html">Element Text</a>
</li><li><a href="#help/ah_scene_element_text_colour.html">Element Text Colour</a>
</li><li><a href="#help/ah_scene_element_position.html">Element Position</a>
</li><li><a href="#help/ah_scene_element_size.html">Element Size</a>
</li><li><a href="#help/ah_scene_element_visibility.html">Element Visibility</a>
</li><li><a href="#help/ah_scene_element_test.html">Test Element</a>
</li></ul>

<h4>See Also</h4>

The <a href="#activity_elementedit.html">Element Editor</a> screen.

<a name="element_doodle.html">

<h2>
	Scene Element: Doodle
	<img style="float:right" src="./Tasker for Android_files/icon_tasker.png">
</h2>

<h4>About</h4>

A <i>Doodle</i> is an image created by the user with a simple finger-painting
screen.

<p>
Click the <i>Doodle</i> parameter to edit the doodle.
</p>

<p>
Doodles are stored on external storage in the directory <code>/sdcard/Tasker/cache/doodles</code>
in case they are masterpieces which demand publishing.
</p>

<h4>Events</h4>

</a><ul><a name="element_doodle.html">
</a><li><a name="element_doodle.html"></a><a href="#tap">Tap, Long Tap</a>, 
</li><li><a href="#stroke">Stroke</a> 
</li></ul>

<h4>Related Actions</h4>

<ul>
<li><a href="#help/ah_scene_element_position.html">Element Position</a>
</li><li><a href="#help/ah_scene_element_size.html">Element Size</a>
</li><li><a href="#help/ah_scene_element_visibility.html">Element Visibility</a>
</li><li><a href="#help/ah_scene_element_test.html">Test Element</a>
</li></ul>

<h4>See Also</h4>

The <a href="#activity_elementedit.html">Element Editor</a> screen.

<a name="element_image.html">

<h2>
	Scene Element: Image
	<img style="float:right" src="./Tasker for Android_files/icon_tasker.png">
</h2>

<h4>Events</h4>

</a><ul><a name="element_image.html">
</a><li><a name="element_image.html"></a><a href="#tap">Tap, Long Tap</a>
</li><li><a href="#stroke">Stroke</a>
</li></ul>

<h4>Related Actions</h4>

<ul>
<li><a href="#help/ah_scene_element_position.html">Element Position</a>
</li><li><a href="#help/ah_scene_element_size.html">Element Size</a>
</li><li><a href="#help/ah_scene_element_visibility.html">Element Visibility</a>
</li><li><a href="#help/ah_scene_element_test.html">Test Element</a>
</li></ul>

<h4>See Also</h4>

The <a href="#activity_elementedit.html">Element Editor</a> screen.

<a name="element_shape.html">

<h2>
	Scene Element: Oval / Rectangle
	<img style="float:right" src="./Tasker for Android_files/icon_tasker.png">
</h2>

<h4>About</h4>

Shape elements are intended mostly for decoration but can also be used
as invisible 'launchpads' for e.g. stroke events.

<h4>Events</h4>

</a><ul><a name="element_shape.html">
</a><li><a name="element_shape.html"></a><a href="#tap">Tap, Long Tap</a>
</li><li><a href="#stroke">Stroke</a>
</li></ul>

<h4>Related Actions</h4>

<ul>
<li><a href="#help/ah_scene_element_position.html">Element Position</a>
</li><li><a href="#help/ah_scene_element_size.html">Element Size</a>
</li><li><a href="#help/ah_scene_element_visibility.html">Element Visibility</a>
</li><li><a href="#help/ah_scene_element_test.html">Test Element</a>
</li></ul>

<h4>See Also</h4>

The <a href="#activity_elementedit.html">Element Editor</a> screen.

<a name="element_map.html">

<h2>
	Scene Element: Map
	<img style="float:right" src="./Tasker for Android_files/icon_tasker.png">
</h2>

<h4>About</h4>

A <i>Map</i> element is a view onto the same kind of map window used by Google Maps
but is much more automateable than the standalone app.

<p>
It's only possible to have one Map element per scene and Map elements
cannot appear in Overlay scenes.
</p>

<h4>Related Actions</h4>

</a><ul><a name="element_map.html">
</a><li><a name="element_map.html"></a><a href="#help/ah_scene_element_add_geomarker.html">Element Add GeoMarker</a> 
</li><li><a href="#help/ah_scene_element_delete_geomarker.html">Element Delete Geomarker</a>
</li><li><a href="#help/ah_scene_element_map_control.html">Element Map Control</a>
</li><li><a href="#help/ah_scene_element_value.html">Element Value</a>
</li><li><a href="#help/ah_scene_element_position.html">Element Position</a>
</li><li><a href="#help/ah_scene_element_size.html">Element Size</a>
</li><li><a href="#help/ah_scene_element_visibility.html">Element Visibility</a>
</li><li><a href="#help/ah_scene_element_test.html">Test Element</a>
</li></ul>

<h4>Events</h4>

<ul>
<li> <a href="#tap">Tap, Long Tap</a>
</li></ul>

<h4>See Also</h4>

The <a href="#activity_elementedit.html">Element Editor</a> screen.

<a name="element_menu.html">

<h2>
	Scene Element: Menu
	<img style="float:right" src="./Tasker for Android_files/icon_tasker.png">
</h2>

<h4>About</h4>

A menu displays a variable selection of items and can have a separate action, text and
icon defined for each item in the list.

<h4>Parameter: Source</h4>

Items can either be filled manually or from a variable array. In the case of an array,
the list shows all the items starting at the first index; %var(1) %var(2) etc.

<p>
In the case of manual specification, click on the <i>Items</i> tab in the element editor
to specify the items.
</p>

<h4>Parameter: Selection Mode</h4>

There are three selection modes:
<ul>
<li>single: tapping an item deselects any other item selected
</li><li>multi: several items can be selected at the same time
</li><li>none: tapping an item never selects it
</li></ul>

<p>
Selected items are highlighted. There are two ways to find out the selected
items:

</p><ul>
<li>assign a task under the <b>Item Tap</b> element event tab. Every time an item is
tapped, the selected items are available in the local variable <b>%select_indices</b>
</li><li>query the selected items at any time using the action <code>Element Get Value</code>
</li></ul>

<h4>Parameter: Item Layout</h4>

Specifies how each item within the list will be displayed. Each item has exactly the same layout. To change the layout, click on it. Each Menu element has it's own unique item layout.

<p>
There are two pre-defined layouts you can choose from (click the magnifying glass icon). 'Icon and Text' is the default.
</p>

<h4>Events</h4>

</a><ul><a name="element_menu.html">
</a><li><a name="element_menu.html"></a><a href="#tap">Item Tap, Item Long Tap</a>
</li></ul>

<h4>Related Actions</h4>

<ul>
<li><a href="#help/ah_menu.html">Menu</a><br>
allows easy display of a dialog with a title and showing a single menu
element.
<br>
When using the Menu action, items are configured in the action itself
rather than in the Menu element.
</li><li><a href="#help/ah_scene_element_position.html">Element Position</a>
</li><li><a href="#help/ah_scene_element_size.html">Element Size</a>
</li><li><a href="#help/ah_scene_element_visibility.html">Element Visibility</a>
</li><li><a href="#help/ah_scene_element_test.html">Test Element</a>

</li></ul>

<a name="element_slider.html">

<h2>
	Scene Element: Slider
	<img style="float:right" src="./Tasker for Android_files/icon_tasker.png">
</h2>

<h4>About</h4>

A standard Android 'seek bar' enhanced to allow specification of the
thumb icon and display indicators for the min, max and current values.

<h4>Events</h4>

</a><ul><a name="element_slider.html">
</a><li><a name="element_slider.html"></a><a href="#value">Value Selected</a>
</li></ul>

<h4>Related Actions</h4>

<ul>
<li><a href="#help/ah_scene_element_value.html">Element Value</a>
</li><li><a href="#help/ah_scene_element_position.html">Element Position</a>
</li><li><a href="#help/ah_scene_element_size.html">Element Size</a>
</li><li><a href="#help/ah_scene_element_visibility.html">Element Visibility</a>
</li><li><a href="#help/ah_scene_element_test.html">Test Element</a>
</li></ul>

<h4>See Also</h4>

The <a href="#activity_elementedit.html">Element Editor</a> screen.

<a name="element_text.html">

<h2>
	Scene Element: Text
	<img style="float:right" src="./Tasker for Android_files/icon_tasker.png">
</h2>

<h4>About</h4>

Displays non-editable text for labels etc.

<h4>Parameter: Position</h4>

Where to place the text within its box

<h4>Parameter: Text Width Scale</h4>

A horizontal scaling factor to squash up
(negative values) or stretch (positive values) the text.

<h4>Parameter: Vertical Fit Mode</h4>

What to do when the height of the text to display is greater than
the height of the element.

<h4>Parameter: Text Format</h4>

Specifies how the text should be displayed.

<ul>
	<li><i>Plain Text</i><br>just show the text as-is
	</li><li><i>Text With Links</i><br>things that look like links are clickable (though not in the scene editor) e.g. URLs, email addresses, phone numbers
	</li><li><i>HTML</i><br>interpret the text as a piece of HTML. Only simple tags are interpreted and no images are displayable
</li></ul>

<h4>Events</h4>

</a><ul><a name="element_text.html">
</a><li><a name="element_text.html"></a><a href="#tap">Tap, Long Tap</a>
</li><li><a href="#stroke">Stroke</a>             
</li></ul>

<h4>Related Actions</h4>

<ul>
<li><a href="#help/ah_scene_element_text.html">Element Text</a><a>
</a></li><li><a href="#help/ah_scene_element_text_colour.html">Element Text Colour</a>
</li><li><a href="#help/ah_scene_element_border.html">Element Border</a>
</li><li><a href="#help/ah_scene_element_background_colour.html">Element Back Colour</a>
</li><li><a href="#help/ah_scene_element_position.html">Element Position</a>
</li><li><a href="#help/ah_scene_element_size.html">Element Size</a>
</li><li><a href="#help/ah_scene_element_visibility.html">Element Visibility</a>
</li><li><a href="#help/ah_scene_element_test.html">Test Element</a>
</li></ul>

<h4>See Also</h4>

The <a href="#activity_elementedit.html">Element Editor</a> screen.

<a name="element_textedit.html">

<h2>
	Scene Element: TextEdit
	<img style="float:right" src="./Tasker for Android_files/icon_tasker.png">
</h2>

<h4>About</h4>

A standard Android box for text entry.
<p>
TextEdit elements cannot appear in Overlay scenes.
</p>

<h4>Parameter: Position</h4>

Where to place the text within its box

<h4>Parameter: Text Width Scale</h4>

Horizontal scaling factor to squash up (negative values) or stretch (positive values) the text.

<h4>Events</h4>

</a><ul><a name="element_textedit.html">
</a><a href="#text">Text Changed</a>
</ul>

<h4>Related Actions</h4>

<ul>
<li><a href="#help/ah_scene_element_text.html">Element Text</a><a>
</a></li><li><a href="#help/ah_scene_element_text_colour.html">Element Text Colour</a>
</li><li><a href="#help/ah_scene_element_border.html">Element Border</a>
</li><li><a href="#help/ah_scene_element_background_colour.html">Element Back Colour</a>
</li><li><a href="#help/ah_scene_element_position.html">Element Position</a>
</li><li><a href="#help/ah_scene_element_size.html">Element Size</a>
</li><li><a href="#help/ah_scene_element_visibility.html">Element Visibility</a>
</li><li><a href="#help/ah_scene_element_test.html">Test Element</a>
</li></ul>

<h4>See Also</h4> 

The <a href="#activity_elementedit.html">Element Editor</a> screen.

<a name="element_web.html">

<h2>
	Scene Element: Web
	<img style="float:right" src="./Tasker for Android_files/icon_tasker.png">
</h2>

<h4>About</h4>

A <i>Web</i> element is like a browser window.

<h4>Parameters: Mode / Source</h4>

These parameters determine how the content for the WebView is to be acquired.
<ul>
	<li><i>URI</i>: the <i>Source</i> parameter refers to a URI
(e.g. http://) from which the WebView should retrieve content.
	</li><li><i>File</i>: the <i>Source</i> parameter contains a local
file path from which the WebView should retrieve content.
	</li><li><i>Direct</i>: the <i>Source</i> parameter directly specifies
the HTML and/or JavaScript content to load
</li></ul>

<h4>Parameter: Allow Phone Access</h4>

</a><p><a name="element_web.html">
If checked, the content in the WebView is allowed access to local device
data stores and can run JavaScript, including Tasker's </a><a href="#javascript.html">JavaScript Interface functions</a>.
</p>
<p>
This is a very powerful feature, since it allows a WebView to
present a complex and highly functional interface, but
should only be enabled if you entirely trust the source of
the specified content.
</p>

<h4>Parameter: Self Handle Links</h4>

<p>If checked, links will be handled by the WebView itself, otherwise they
will be passed to the system for handling e.g. by the default web browser.
</p>

<h4>Events</h4>

<ul>
<a href="#linktap">Link Tap</a>,
<a href="#pageloaded">Page Loaded</a>
</ul>

<h4>Related Actions</h4>

<ul>
<li><a href="#help/ah_scene_element_web_control.html">Element Web Control</a>
</li><li><a href="#help/ah_scene_element_position.html">Element Position</a>
</li><li><a href="#help/ah_scene_element_size.html">Element Size</a>
</li><li><a href="#help/ah_scene_element_visibility.html">Element Visibility</a>
</li><li><a href="#help/ah_scene_element_test.html">Test Element</a>
</li></ul>

<h4>See Also</h4>

The <a href="#activity_elementedit.html">Element Editor</a> screen.

<a name="activity_elementedit.html">
<h2>
	Scene Element Edit
	<img style="float:right" src="./Tasker for Android_files/icon_tasker.png">
</h2>

<p>
Allows configuration of the properties of a scene element. The different
types of property are divided into tabs.
</p>

</a><ul><a name="activity_elementedit.html">
</a><li><a name="activity_elementedit.html"></a><a href="#ui">UI</a> 
</li><li><a href="#items">Items</a> 
</li><li><a href="#background">Background</a> 
</li><li><a href="#event">Event</a> 
<ul>
<li><a href="#tap">Tap, Long Tap</a> 
</li><li><a href="#value">Value Selected</a> 
</li><li><a href="#itemtap">Item Tap</a> 
</li><li><a href="#stroke">Stroke</a> 
</li><li><a href="#text">Text Changed</a> 
</li><li><a href="#linktap">Link Tap</a> 
</li><li><a href="#pageloaded">Page Loaded</a> 
</li></ul>
</li></ul>

<p>
Not all elements have all tabs.
</p>

<a name="ui">
<h3>UI</h3>

For the most part, configures the visual style of the element.

</a><a name="items">
<h3>Items</h3>

<p>
Only relevant to Menu elements.
</p>
<p>
Each row configures an item in the menu. Starting from the left, the controls
are:

</p><ul>
	<li><b>selection checkbox</b><br> this is only present when <i>Selection Mode</i> is set to <b>Single</b> or <b>Multi</b>. It stipulates whether the item will be shown as selected when the menu is displayed.
	</li><li><b>icon button</b><br> the icon to show for the item. If you don't want to show an icon, hide the icon element in the Layout parameter in the UI tab
	</li><li><b>label text</b><br> the label to show for the item. If you don't want to show a label, hide the label element in the Layout parameter in the UI tab
	</li><li><b>action button</b><br> an action to run when the item is tapped
	</li><li><b>trash can</b><br> used to delete the item
</li></ul>

<p>
To add an item, click the plus button at the bottom of the screen.
</p>

</a><a name="background">
<h3>Background</h3>

Configures a rectangle shape to be used as the background for the element
when it is displayed. The background will be stretched to fit the size of
the element.
</a><p><a name="background">
If you want to use an image for a background, create a separate Image element and
place it underneath.

</a><a name="event">
</a></p><h3><a name="event">Event Tabs</a></h3><a name="event">

<p>
Event tabs stipulate what Tasker should do when the user interacts with the
element in some way. Most consist only of a task to specify but some
allow a filter specification so that the task only runs if the event matches
the filter.
</p>

<p>
To help the task to decide what to do with the event and to allow a single
task to handle many different events if desired, Tasker sets certain 
local variables which give specific information about it. The variables
are easily accessible by clicking the usual variable tag icon in any action
in the task.

</p><p>The following variables are available in all such tasks:</p>
<ul>
	<li><b>%scene_name</b><br> the name of the scene containing the element
	</li><li><b>%element_name</b><br> the name of the element that the user interacted with (e.g. Button1)
	</li><li><b>%element_type</b><br> the type of element (e.g. Button)
	</li><li><b>%event_type</b><br> the name of the event (e.g. Tap)
</li></ul>

</a><a name="text">
<h4>Text Changed</h4>

Elements: <i>TextEdit</i>

<p>
This event is triggered whenever the text changes e.g. because a
letter key has been pressed while the element had focus.
</p>

<ul>
	<li><b>%new_val</b><br> the new text
	</li><li><b>%old_val</b><br> the old text
</li></ul>

</a><a name="tap">
<h4>Tap, Long Tap</h4>

Elements: <i>Button, Doodle, Image, Map, Oval, Rectangle, Text</i>


<p>
In a <i>Map</i> element, the following variables are available:
</p>

<ul>
	<li><b>%coord</b><br> the latitute,longitude of the tapped location on the map
	</li><li><b>%label</b><br> the label of the tapped GeoMarker (if any). You can add GeoMarkers to a Map element with the action Scene / Element Add GeoMarker
</li></ul>

</a><a name="value">
<h4>Value Selected</h4>

Elements: <i>Slider</i>

<ul>
	<li><b>%new_val</b><br> the new value of the element (e.g. 50)
	</li><li><b>%old_val</b><br> the last selected value (e.g. 43)
</li></ul>

</a><a name="itemtap">
<h4>Item Tap, Item Long Tap</h4>

Elements: <i>Menu</i>

<ul>
	<li><b>%select_indices</b><br> a comma-separated list of currently selected items in the list (e.g. 3,4)
	</li><li><b>%select_labels</b><br> a comma-separated list of the labels of currently selected items in the list (e.g. Blue,Yellow)
	</li><li><b>%tap_index</b><br> the index of the item that was tapped to cause this event (e.g. 3)
	</li><li><b>%tap_label</b><br> the label of the item that was tapped to cause this event (e.g. Blue)
</li></ul>

</a><a name="stroke">
<h4>Stroke</h4>

Elements: <i>Doodle, Image, Oval, Rectangle, Text</i>

<p>
A stroke has two filter parameters.
</p>

<ul>
	<li><b>Direction</b><br>the direction from the start point of the stroke to the end point
	</li><li><b>Length</b><br>minimum distance in (approximate) pixels from the start point of the stroke to the end point 
</li></ul>

<p>
If either of these parameters don't match the event, the task will not run.
</p>

<ul>
	<li><b>%stroke_dir</b><br>Direction, as described above
	</li><li><b>%stroke_len</b><br>Length, as described above
</li></ul>

</a><a name="linktap">
<h4>Link Tap</h4>

Elements: <i>WebView</i>

<p>
A Link Tap has two filter parameters:
</p>

</a><ul><a name="linktap">
	</a><li><a name="linktap"><b>URL</b><br> the URL of the tapped link. If entered, the tapped URL must </a><a href="#matching.html">match</a> the entry (e.g. http://*.fruit.com) for the task to run
	</li><li><b>Stop Event</b> <br>whether to stop the WebView following the link
</li></ul>

<ul>
	<li><b>%url</b><br> URL as described above
</li></ul>

<a name="pageloaded">
<h4>Page Loaded</h4>

Elements: <i>WebView</i>

<ul>
	<li><b>%url</b><br> the URL of the page (e.g. http://i.hate.fruit/except/mangos.html)
</li></ul>

</a><a name="appcreation.html">

<h2>
	App Creation
	<img style="float:right" src="./Tasker for Android_files/icon_tasker.png">
</h2>

</a><ul><a name="appcreation.html">
	</a><li><a name="appcreation.html"></a><a href="#intro">Introduction</a>
	</li><li><a href="#example">Hello World Example</a>
	</li><li><a href="#config">App Configuration</a>
	</li><li><a href="#sign">Signing</a>
	</li><li><a href="#target">Target Device Requirements</a>
	</li><li><a href="#misc">Miscellaneous</a>
	</li><li><a href="http://tasker.dinglisch.net/faq-appcreation.html">FAQ (External Link)</a>
</li></ul>

<a name="intro">
<h3>Introduction</h3>

<p>
Tasker allows creation of completely standalone apps (APK files) which have no
requirement for Tasker to be installed on the device they're used on.
</p>
<p>
The intention is to allow people to create their own apps for fun, for sale 
or just to share with friends.  Or if you are concerned about all 
the permissions Tasker needs you
can create an app that has only the permissions you require!
</p>

<p>
App creation is uncomplicated and takes only a few seconds once you're setup.
</p>

<p>
To create apps, you need the following on <b>your</b> device (not necessarily
on the device(s) the app will run on):
</p>

<ul>
	<li>Android 2.3+
	</li><li><i>Tasker App Factory</i> (free, see below)
	</li><li>a device with an <i>ARM</i> or <i>x86</i> processor (the vast majority of devices have one of those)
</li></ul>

<p>App creation is accessed by long-clicking on a project (<b>not</b> the base project) or task
and selecting <b>Export</b> then <b>As App</b>. Any 
linked resources needed (e.g. other tasks, images) are included
as part of the new app.
</p>
<p>
To export anything except a single task, you need to create a project and put anything you
wish to export in the project.
</p>

</a><a name="example">
<h3>Hello World Example</h3>

Let's make a simple app that just pops up <b>Hello World!</b> when it's launched. This example assumes that you are in <i>Beginner Mode</i>, please make sure that <code>Menu / Prefs / UI / Beginner Mode</code> is checked before you start.

<h4>1. Create A Task</h4>

<ul>
	<li><b>make a new task</b><br>
	click on the Tasks tab then click <b>+</b> to add a new task.
	Give it a name <i>Hello World</i>.

	</li><li><b>give the task an icon</b><br>
	 long-click on the colourful icon in the bottom right and pick any icon

	</li><li><b>add the Popup action</b><br>
	click <b>+</b> in the bottom left to add an action, select category <b>Alert</b> and then action <b>Popup</b>. Fill in <b>Hello World!</b> in the <i>Text</i> parameter, then click the accept button bottom left to accept the action, then again to accept the task.

	</li><li><b>ask Tasker to create an app</b><br>
	long-click on the task you just made, select <b>Export</b> then <b>As App</b>. A popup appears mentioning a Missing App.
</li></ul>

<h4>2. Install Tasker App Factory</h4>

<p>
To generate apps, Tasker needs a free helper app called <i>Tasker App Factory</i>.
It's available on Play Store and from the Tasker website.
</p>

<p>
Click the accept button on the popup to install the helper app.
</p>

<h4>3. App Generation</h4>

<p>
Tasker should now start generating your app, which will take maybe 12 seconds
depending on your device.
</p>

<p>
If all goes well, the Cancel button will turn into an OK button meaning
your app is ready!
</p>

<p>We can't run the app straight away though because it hasn't been installed.
Click on the rightmost bottom button with the Android icon to ask Android
to install your app.
</p>

<p>
Once Android is done installing, you can click it's <b>Open</b> button to
run the app, or you can simply go to the home screen and click on the app's
icon in the launcher.
</p>

<p>
You should see a Hello World popup!
</p>

</a><a name="config">
<h3>App Configuration</h3>

<p>
When in Beginner Mode, and if you only have one task to install, 
Tasker will make guesses about how to configure the resulting app.
</p>
<p>More usually, before an app is generated you will be presented
with a configuration screen which lets you specify various options
for the new app.
</p>


</a><a name="sign">
<h3>App Signing</h3>

<p>
Android requires that all apps be <i>signed</i> i.e. that they certify who
created them. By default, Tasker uses an automatically-generated 
insecure certificate to sign apps and doesn't bother mentioning it. 
</p>

<p>
However, if you want to release an app via a public site
(Play Store for example), you will need to sign it with a 
proper (secure) certificate.
That's done so the site knows that it's you that's giving
them the app each time you submit a new version.
</p>

<p>Certificates are kept in a <i>keystore</i> which is protected
with a password. To generate a keystore with a secure certificate,
use <code>Menu / More / Developer Options / Create Certificate</code>.
</p>

<p>
Once you've generated the keystore, Tasker will often need to
ask you for the certificate password before app generation so that
it can be used to sign each new version of your app.
</p>

<p>Tasker makes an automatic backup of your keystore to
</p><pre>	/sdcard/Tasker/factory/keystore.user
</pre>

<p>
when it is first created and when you backup your profile data
with <code>Menu / Data / Backup</code>. It's highly advisable
to make a copy of that file and keep it safe away from your device.
</p>

</a><a name="target">
<h3>Target Device Requirements</h3>

The device the child app is used on must meet the following requirements:

<ul>
	<li>have the Google Maps library installed, even if the exported project
or task does not use location in any way
	</li><li>the minimum SDK version specified in the Kid Config screen
	</li><li>have hardware corresponding to features specified in the Kid Config screen
</li></ul>

</a><a name="misc">
<h3>Miscellaneous</h3>

<h4>Accessibility Service</h4>

<p>
Android accessibility support changed in Android 4.1 (JellyBean). If support is 
needed for accessibility services in 4.1+, the <b>Minimum Android Version</b> in
the child Configuration screen must be set to <b>16</b> or higher. If support is required
pre-4.1, it must be set to <b>less than</b> 16.
</p>
<p>In other words, to support both pre- and post-4.1 devices, two APKs must be
generated.</p>

<p>
This applies to all features that rely on an Accessibility Service (events <i>Notification, New Window, Button Widget Clicked, Notification Click</i>, variables <i>%NTITLE, %WIN</i>) 
</p>
<p>
Google Play Store allows publication of APKs targetting different Android versions
under the same package name, however this has not been tested by the developer
of Tasker.
</p>

<h4>Monitor Service</h4>

<p>
Most child apps include a service which constantly monitors for events. If you know that you don't need
to monitor events anymore (in-between app launches) you can use the <i>Disable</i> action in the Tasker category to
stop it.
</p>

<p>
It will be automatically started again next time the app is launched.
</p>

<h4>Widgets / Shortcuts</h4>

<ul>
	<li>it's not possible in Android to auto-create widgets with any app
	</li><li>it's not possible *currently* to offer the user child-app widgets,
	that may be available in the future to some extent
</li></ul>

<h4>Memory Problems</h4>

If you are having low memory problems during app generation, you can ask
the App Factory to use external storage for the generation process.
See <code>Menu / Prefs / More / Factory</code>.

<h4>Preferences</h4>

<p>
The new app currently has the same <b>default</b> preferences as Tasker
with a couple of exceptions.
</p>

<p>
You can use the <i>Set Tasker Pref</i> action in the <i>Tasker</i> category
to change some of the preferences when the app is running.
</p>

<h4>Available Tasker Features</h4>

Obviously, the device the new app runs on may not have the same set of
available e.g. actions as the device the app is created on.

<p>
The <i>Test</i> action in the <i>Misc</i> category allows you to check
which Tasker features are available at <i>run time</i> (when the app
is being used).
</p>

<h4>Images</h4>

Referenced images (even scene doodles and photos from the SD card)
are bundled in with the app.

<h4>Plugins</h4>

<p>
When the new app is launched, it checks that all referenced plugins
are installed on the device and prompts the user to install missing ones.
</p>
<p>
Some plugins may not work on other devices if they themselves store something about the
action to be performed, since that data will not be available on the
other device.
</p>

</a><p><a name="misc">
Plugin authors: see also </a><a href="http://tasker.dinglisch.net/plugins.html#gen">here</a>.
</p>

<h4>JavaScript actions</h4>

Scripts referenced by a <i>JavaScript</i> action are packaged with the new app
and run directly from there.

<h4>SL4A Scripts</h4>

Scripts referenced in a <i>Run Script</i> action are packaged with the new
app and unpacked to <code>/sdcard/sl4a/scripts</code>, prefixed with the
package name, on first run. Tasker automatically inserts the WRITE_EXTERNAL_STORAGE
permission for that purpose.

<p>
If SL4A is missing on the target device, the new app will prompt the user 
to download when launched.
</p>
<p>
If a new version of the app is reinstalled on the target device, the new versions
of the scripts will be written if the <b>length</b> has changed.
</p>

<h4>Other External Components</h4>

The following external components are also checked for on launch of the new app where
necessary:

<ul>
	<li>Speech engines (<i>Say, Say After</i>)
	</li><li>APNDroid (<i>Mobile Data APN</i>)
	</li><li>Zoom (<i>Zoom</i> action category actions)
	</li><li>apps for <i>3rd Party</i> actions
	</li><li>apps for <i>3rd Party</i> events
</li></ul>

<h4>Maps</h4>

<p>
The data for Maps is provided by Google and they require a <i>maps key</i> for
each developer that uses it.
</p>

<p>
If you are using Map scene elements in your app, you will need to acquire a key
from Google that can be included with your app.
</p>

<ol>
<li>[if necessary] setup a <a href="http://www.google.com/accounts/">Google Account</a>
</li><li>[if necessary] create a <a href="#sign">signing keystore</a>
</li><li>get a fingerprint of your certificate: <code>Menu / More / Developer Options / Certificate Checksum</code>
</li><li>fill in the fingerprint at <a href="https://developers.google.com/android/maps-api-signup">Google's request page</a>.
</li><li>in the App Configuration screen when generating your app, enter the map key in the relevant box. The box
will only be presented if your app uses one or more Map scene elements.
</li></ol>

<h4>Variables</h4>

The new app is completely independent of Tasker, so it also does
not share any variable values.

<h4>Permissions</h4>

Tasker attempts to reduce the set of permissions required by the new app to
the smallest set required for the functionality it contains. For example,
no <i>Vibrate</i> permission will be requested if there is no vibrate action
used.
<p>
The WAKE_LOCK permission is unfortunately always required for technical reasons.
</p>

<h4>App Size</h4>

Generated apps are minimally around 640K but are unlikely to be
significantly larger unless a lot of images are referenced.
It's possible that this minimum can be reduced in the future.

<h4>Encryption</h4>

<p>
Code for encryption is included in any app created by App Factory, however
if you don't use encryption features it's unlikely to be a problem
in terms of export restrictions. However, that is an opinion, it is <b>not legal advice</b>.
</p>
<p>
Note that code libraries for encryption are included with every Android device. Tasker
(and child apps) use these libraries to perform the encryption, they do not contain
encryption code themselves.
</p>

<h4>Licence</h4>

<p>
You are free to distribute and sell apps created by Tasker in any
way you wish. No licence fees to the developer of Tasker are necessary.
It would be courteous to reference Tasker and it's website 
(http://tasker.dinglisch.net) somewhere in your new app if possible.
</p>

<p>
Please note that use of images from some Ipacks in commercial software
is prohibited by the licence terms of the image creators. You will need
to contact the image designer to request their assent in such cases.
(the origin of an Ipack's images is displayed in the Ipack image selection
screen).
</p>
<p>
Tasker's builtin icons are mostly from the <a href="http://everaldo.com/crystal/">Crystal Project</a>,
please check the licence terms on their website.
</p>

<a name="app_widgets.html">

<h2>
	Task / Shortcut Widgets
	<img style="float:right" src="./Tasker for Android_files/icon_tasker.png">
</h2>

The standard way of running a Tasker task is by attaching it to a profile
which performs it when the profile becomes active. However, tasks can
be directly assigned to icons on the home screen called <i>Widgets</i> or
<i>Shortcuts</i>.

<h4>Standard Widgets / Shortcuts</h4>

These consist of an icon (the Task icon) with a label (the Task name)
underneath, and look identical to the normal application icons
in the home screen.
<p>
Clicking on the icon runs the associated Task.
</p>

<h4>Task Timer Widgets</h4>

This type consists of an icon and label, like the standard widgets,
but also has a countdown timer display which counts down Days, Hours, 
Minutes and Seconds.
<p>
When the timer expires (reaches 0) the associated Task is run.
</p>
<p>
Tapping on the <b>icon</b> of the widget shows a configuration
screen where the timer can be configured.
</p>
<p>
Tapping on the <b>timer section</b> of the widget will pause,
restart or reset the timer, depending on its current state.
</p>
<p>
Note that the timer updates more rarely when it is still a long
way from expiry in order to minimize  power usage.

</p><h4>Creating a Widget / Shortcut</h4>

</a><ol><a name="app_widgets.html">
	<li>Click and hold in an empty space on the Android home screen, until
	a dialog appears.
	</li><li>Select <b>Widgets</b> or <b>Shortcuts</b>
	</li><li>Select <b>Task</b> or <b>Task Timer</b> (Widgets only)
	</li><li>Pick an existing task or create a new one. When creating a new one, if
	you do not expect to change the function of the widget/shortcut select
	One-Time to avoid it cluttering your list of tasks.
	</li></a><li><a name="app_widgets.html">Use the </a><a href="#activity_widget_configure.html">Configuration Screen</a>
	to configure what should happen when the icon is clicked (or the timer
	expires, in the case of a Task Timer widget). Take care to
	select an appropriate name and icon for the task, as these will appear on
	the home screen.
</li></ol>

<h4>Changing a Widget / Shortcut</h4>

<p>
The function of widgets or shortcuts created from one-time tasks cannot be changed, it must be deleted and recreated.
</p>

<p>
On the other hand, if you associate a normal named task with a widget or shortcut then when the task is changed (via the Task Edit
screen) the function of the widget or shortcut also changes.
</p>

<p>
There are also some actions which will change the appearance of any widget:
</p>

<ul>
	<li><i>Tasker/Change Icon Set</i>: changes the icon of a set of widgets to a different
	style.
	</li><li><i>Tasker/Set Widget Icon</i>: changes the icon of a particular widget
	</li><li><i>Tasker/Set Widget Label</i>: changes the label of a particular widget
</li></ul>

The latter two you could use to visually show the status of something e.g. WiFi.

<h4>Deleting a Widget / Shortcut</h4>

<p>
Click and hold on the icon in the Android home screen until the dustbin
icon appears. Drag the widget or shortcut icon to the dustbin icon and release.
</p>

<a name="diff" a="">
<h4>Differences Between Widgets and Shortcuts</h4>

<h5>Advantages of Shortcuts</h5>

<ul>
        <li>they can be created in some places that widgets can't e.g. in home screen folders
        </li><li>their layout probably better matches the default launcher layout
        </li><li>long shortcut labels will scroll when selected in the default launcher
        </li><li>they use slightly fewer system resources, though it's probably not noticeable
</li></ul>

<h5>Advantages of Widgets</h5>

<ul>
        <li>they can use image files from SD for their icon
        </li><li>their icon and label can be dynamically changed after creation
        via the <i>Set Widget Icon</i> and <i>Set Widget Label</i> actions.
        </li><li>timer widgets are possible
        </li><li>they can be created without a label
</li></ul>

So a shortcut should be used unless the extra configuration possibilities of a widget are necessary.

<h4>General</h4>	

<ul>
	<li>you can create as many Tasker widgets and shortcuts as you like. You can even have several Timer widgets running at the same time.
	</li><li>Timer Task widgets continue to update even when the screen is off.
</li></ul>

</a><a name="beginner.html">

<h2>
	Beginner Mode
	<img style="float:right" src="./Tasker for Android_files/icon_tasker.png">
</h2>

When Tasker first starts, <i>Beginner Mode</i> is enabled.

<p>
In Beginner Mode, Tasker attempts to simplify things for inexperienced
users, mostly by UI elements which are unlikely to be needed by
inexperienced users.
</p>

<p>
Beginner Mode can be disabled by unchecking the option:
</p>

<blockquote>
<code>
Menu / Prefs / UI / Beginner Mode
</code>
</blockquote>

<p>
Some of the changes made in Beginner Mode are:
</p>
<ul>
	<li>main screen, Variables tab removed
	</li><li>main screen, export options removed
	</li><li>main screen, project tab not accessible
	</li><li>task edit screen, task properties icon removed
	</li><li>action edit screen, Label, Continue On Error parameters removed
	</li><li>prefs screen, many options removed
</li></ul>

<p>In the userguide, when references are found to things which do not
appear on the screen. It's worth disabling Beginner Mode to see if that's
the problem.
</p>

</a><a name="cpu.html">

<h2>
	CPU Control
	<img style="float:right" src="./Tasker for Android_files/icon_tasker.png">
</h2>

<hr>
<p>
<b>Note:</b> CPU control can damage your hardware e.g. by the CPU overheating. As for all Tasker
functions, you use it at your own risk!
</p>
<hr>

<h3>General</h3>

<p>
On a rooted device (only) Tasker is able to control the CPU frequency of an Android device to some extent. This
is usually done either to save battery or make the device more responsive depending on the circumstances.
</p>
<p>
The relevant control action is <b>CPU</b> in the <b>Misc</b> category.
You can monitor the current state with the variables <b>%CPUFREQ</b> and <b>%CPUGOV</b>.</p>
<p></p>
<p>There are two aspects which can be controlled, the Frequency Range and the
CPU Governor. You will need to experiment with combinations of these to achieve the best results.</p>

<h3>Frequency Range</h3>

<p>
You can set the minimum and maximum frequency which the CPU is allowed to run at. Only certain frequencies
are valid, depending on the CPU (click on the magnifying glass button to select a valid value).
</p>
<p>
The maximum frequency is probably initially set lower than the maximum frequency that the CPU can actually handle. If that is the case, you should be very cautious about setting it higher. Tasker will warn
you the first time you try to do configure an action to do that, assuming
you have not been using other apps to change the maximum frequency limit.
</p>

<h3>CPU Governor</h3>

<p>
The active <i>governor</i> decides what the CPU frequency should be set to at a particular time, within the frequency
range you have set. Each has it's own unique strategy. Here are the most common governors:

</p><ul>
	<li><i>Performance</i><br>keeps the CPU frequency always at the maximum. Most power-hungry, most responsive.<p>
	
	</p></li><li><i>Powersave</i><br>keeps the CPU frequency always at the minimum. Least power-hungry, least responsive.<p>
	</p></li><li><i>Ondemand</i><br>when the CPU is needed, immediately sets it to maximum frequency. Slowly reduces the
	frequency back down to the minimum as time passes. Responsive, reasonable power usage.<p>
	</p></li><li><i>Interactive</i><br>like Ondemand, but more responsive with slightly more battery usage.<p>
	</p></li><li><i>Conservative</i><br>when the CPU load is needed, slowly increases the frequency to maximum. When the CPU is
no longer needed, immediately drops back to the minimum. Less power-usage than Ondemand or Interactive, less responsive.
</li></ul>

<p>
Not all governors are available on all ROM versions. Your device may also have a governor not described here. You can still set that governor with Tasker.
</p>

<h3>CPU Action Not Available</h3>

Common problems are:

<ul>
	<li><i>root not recognized</i><br>Tasker decides that a device is rooted if <code>/system/app/Superuser.apk</code> is present and <code>su</code> is present in one of the directories of $PATH
	</li><li><i>no available frequencies</i><br>Tasker needs to know what frequencies it can set the CPU to. It looks for the files <code>/sys/devices/system/cpu/cpuX/cpufreq/scaling_available_frequencies, /sys/devices/system/cpu/cpuX/cpufreq/stats/time_in_state</code> and <code>/system/etc/scaling_available_frequencies</code> (in that order). If you know what your CPU frequencies are, you could write them (space-separated, in numerical order) to the first (any number of CPUs) or last (1 CPU only) of those files.
</li></ul>

</a><a name="activity_widget_configure.html">
<h2>
	Widget / Shortcut Configuration
	<img style="float:right" src="./Tasker for Android_files/icon_tasker.png">
</h2>

This screen allows selection and configuration of a task which will be performed when an 
icon is clicked on the Android home screen or a timer elapses.

</a><p><a name="activity_widget_configure.html">
Please read about </a><a href="#app_widgets.html">Task Widgets / Shortcuts</a>
before venturing further on this screen.
</p>
<p>
The layout of the Configuration screen is nearly identical to that of the
<a href="#activity_taskedit.html">Task Edit</a> screen. The
differences are as follows:
</p>
<ul>
	<li><p>there are no icons for renaming or deleting the task</p>
	</li><li>at the  bottom of the Widget Configure screen is a launcher button.
This will take the icon and text of a selected application as the icon and name
of a new macro. You can then change the details as you wish e.g. add an action
before loading, change the icon.
<p>
Tasks created with this button are <i>One-Time</i> only: you can't access them
again after the widget is created.
</p>
</li><li>when creating a Task Timer widget, you'll find a different button in
the bottom right which allows initialization of the timer. You can use this,
or wait till the widget is created and then click on the icon to configure the timer.
</li></ul>

<a name="flowcontrol.html">

<h2>
	Flow Control
	<img style="float:right" src="./Tasker for Android_files/icon_tasker.png">
</h2>

<h4>Overview</h4>

Task flow control is based on the following Tasker elements:

</a><ul><a name="flowcontrol.html">
	</a><li><a name="flowcontrol.html"></a><a href="#variables.html">variable</a> values
	</li><li><a href="#condition">conditions</a> on individual actions
	</li><li><i>If / Else / Endif</i> actions for conditional grouping of following actions
	</li><li><i>For / End For</i> to do a set of actions once for each of a set of elements
	</li><li><i>Goto</i> action (jumping around within a task).
	</li><li><i>Perform Task</i> action (calling other tasks as subroutines)
	</li><li><i>Stop</i> action (terminate task immediately)

</li></ul>

<p>
On the Wiki there is a detailed example of <a href="http://tasker.wikidot.com/fileproc">
processing a file's content</a> [External Link].
</p>
<p>
Tip: if you accidentally create a task that never ends when experimenting
with loops, use the <b>Kill</b> button in the Task Edit screen to end it
manually.
</p>

<a name="condition">

<h5>Conditions</h5>

Every action can have a condition associated with
it (specify this in the Action Edit screen). If the condition does not match,
the action will be skipped.
<p>
A condition consists of an <i>operator</i> ('equals' etc) and two <i>parameters</i>.
The possible operators are:
</p></a><ul><a name="condition">
	</a><li><a name="condition"><i>Matches</i> (~)<br>
	The right parameter is a pattern which the left parameter is </a><a href="#matching.html">matched against</a>.

	</li><li><i>Not Matches</i> (!~)<br>
	As above, but the match must fail for the action to be executed.

	</li><li><i>Less Than</i> (&lt;)<br>
	Both parameters (after variables are substitued) must be numbers or mathematical expressions and the first must be <b>less</b> than the second
	e.g. <code>3</code> &lt; <code>6</code>. See <a href="#maths.html">Maths</a> for more info.

	</li><li><i>Greater Than</i> (&gt;)<br>
	As above, but the first parameter must evaluate to <b>more</b> than the second.

	</li><li><i>Equals</i> (=)<br>
	As above, but the two parameters must be numerically equal.
	
	</li><li><i>Not Equals</i> (!=)<br>
	As above, but the two parameters must be <b>not</b> numerically equal.

	</li><li><i>Is/Isn't Set</i><br>
	Whether the specified variable has a value or not.
</li></ul>

<p>
Expressions which are not mathematically valid  e.g. <i>I Am The Walrus &gt; 5</i> give a warning and evaluate to <b>false</b>
when used with a mathematical operator.
</p>

<a name="for">
<h4>Foreach Loop</h4>

<p>
Goal: perform a set of actions for each of <i>apple</i>, <i>pear</i> and <i>banana</i>.
</p>

<table>
	<tbody><tr bgcolor="#aaaaff" valign="top">
		<td>1.</td> <td><b>For</b><br>%item<br>apple,pear,banana</td>
		<td>Loop once for each of apple, pear and banana</td>
	</tr>
	<tr bgcolor="#aaaaff" valign="top">
		<td>2.</td> <td>&nbsp;&nbsp;<b>Action One</b><br></td>
		<td>Example: Flash %item</td>
	</tr>
	<tr bgcolor="#aaaaff" valign="top">
		<td>3.</td> <td>&nbsp;&nbsp;<b>Action Two</b><br></td>
		<td>...</td>
	</tr>
	<tr bgcolor="#aaaaff" valign="top">
		<td>4.</td> <td><b>End For</b><br>
		</td>
		<td>Return to action 1 if we havn't done all the items yet</td>
	</tr>
</tbody></table>	

<p>
Result: Action One and Action Two are performed three times. The first time, the variable %item is set to <i>apple</i>, the second time <i>pear</i> and the last time <i>banana</i>.
</p>
<p>
You can insert a <code>Goto</code> action in the loop with either <i>Top of Loop</i> (meaning continue, skip to the next item straight away) or <i>End of Loop</i> (meaning break, stop without doing any more items) specified.
</p>
<p>In adition to simple text, the <code>For</code> action accepts any comma-separated combination of these Items:</p>
</a><ul><a name="for">
	<li>a numeric range e.g. 1:5 (= <b>1,2,3,4,5</b>)
	</li><li>a numeric range with a jump e.g. 8:2:-2 (= <b>8,6,4,2</b>)
	</li><li>a numeric range defined by variable values e.g. <i>2:%end:%skip</i>, <i>1:%arr(#)</i>  
	</li><li>a variable name (which is replaced) e.g. %fruit (= <b>banana</b> maybe)
	</li></a><li><a name="for">a </a><a href="#arrays">variable array</a> part e.g. <i>%arr(1:2)</i> (= %arr1, %arr2 = <b>apple,banana</b> maybe)
</li></ul>

<p>
A common case is to use %arr(), which performs a loop for each element in the array %arr.
</p>

<h4>For Loop</h4>

<p>
Goal: perform a set of actions for each of a range of numbers in turn.
</p>

Use the <i>Foreach Loop</i> as described above, with the <i>Items</i> parameter being a range specification e.g. 4:0, 100, 0:8:2 (= <b>4,3,2,1,0,100,0,2,4,6,8</b>).

<h4>Until Loop</h4>

<p>
Goal: perform a Task X until some condition is met (at least once)
</p>

<table>
	<tbody><tr bgcolor="#aaaaff" valign="top">
		<td>1.</td> <td><b>Action One</b><br></td>
		<td>...</td>
	</tr>
	<tr bgcolor="#aaaaff" valign="top">
		<td>2.</td> <td><b>Action Two</b><br></td>
		<td>...</td>
	</tr>
	<tr bgcolor="#aaaaff" valign="top">
		<td>3.</td> <td><b>Goto</b><br>1
		<br><i>If %QTIME <b>&lt;</b> 20</i></td>
		<td>Return to action 1 if runtime &lt; 20</td>
	</tr>
</tbody></table>	

<p>
Result: Action One and Action Two are performed until %QTIME contains the value 20 or more
i.e. until the task has been running for 20 seconds.
</p>

<h4>While Loop</h4>

<p>
Goal: perform a Task X while some condition is met.
</p>

<table>
	<tbody><tr bgcolor="#aaaaff" valign="top">
		<td>1.</td> <td><b>Stop</b><br>
		<br><i>If %fruit <b>Not Matches</b> Apple</i></td>
		<td>Stop task if it's not crunchy, otherwise
		go to next action</td>
	</tr>
	<tr bgcolor="#aaaaff" valign="top">
		<td>2.</td> <td><b>Action One</b><br></td>
		<td>...</td>
	</tr>
	<tr bgcolor="#aaaaff" valign="top">
		<td>3.</td> <td><b>Action Two</b><br></td>
		<td>...</td>
	</tr>
	<tr bgcolor="#aaaaff" valign="top">
		<td>4.</td> <td><b>Goto</b><br>1</td>
		<td>Go back and see if we're still crunchy</td>
	</tr>
</tbody></table>	
<p>
Result: Action One and Action Two are performed while %fruit contains the value Apple.
</p>

<h4>Counter Loop</h4>

<p>
Goal: perform a Task X a set number of times.
</p>
<table>
	<tbody><tr bgcolor="#aaaaff" valign="top">
		<td>1.</td> 
		<td><b>Variable Set</b><br>%count, 0</td>
		<td>Initialize the counter</td>
	</tr>
	<tr bgcolor="#aaaaff" valign="top">
		<td>2.</td> <td><b>Action One</b><br>Label: <i>LoopStart</i></td>
		<td>...</td>
	</tr>
	<tr bgcolor="#aaaaff" valign="top">
		<td>3.</td> <td><b>Action Two</b><br></td>
		<td>...</td>
	</tr>
	<tr bgcolor="#aaaaff" valign="top">
		<td>4.</td> <td><b>Variable Add</b><br>%count, 1</td>
		<td>Add one to %count</td>
	</tr>
	<tr bgcolor="#aaaaff" valign="top">
		<td>5.</td> <td><b>Goto</b><br><i>LoopStart</i>
		<br><i>If %count <b>&lt;</b> 10</i></td>
		<td>Return to action 2 if count &lt; 10</td>
	</tr>
</tbody></table>	

<p>
Result: after initialization of %count to 0, the task loops around the actions 
from 2-5 until
%count reaches 10, at which point the condition on the <code>Goto</code> fails
and the end of the task is reached.
</p>
<p>
Note that we used a <code>Goto</code> to a <b>labelled</b> action this time. In
all but the very simplest tasks it's better to use a label rather than a number. It's easier to work out what's happening and if you insert or delete actions before the loop starts, the <code>Goto</code> will still jump to the right place.
</p>
<p>An alternative way to do this loop is to use a For action specified as <i>0:10</i>.
</p>

<h4>If / Then / Else Condition</h4>

<p>
Goal: perform certain Tasks if conditions are met, otherwise perform a
different task.
</p>

<table>
	<tbody><tr bgcolor="#aaaaff" valign="top">
		<td>1.</td> 
		<td><b>If</b><br>
		<i>%fruit <b>~</b> Apple</i></td>
		<td><b>~</b> is short for 'matches'</td>
	</tr>
	<tr bgcolor="#aaaaff" valign="top">
		<td>2.</td> <td>&nbsp;&nbsp;<b>Action One</b></td>
		<td>...</td>
	</tr>
	<tr bgcolor="#aaaaff" valign="top">
		<td>3.</td> <td>&nbsp;&nbsp;<b>Action Two</b><br></td>
		<td>...</td>
	</tr>
	<tr bgcolor="#aaaaff" valign="top">
		<td>4.</td> 
		<td><b>Else If</b><br>
		<i>%fruit <b>~</b> Pear</i></td>
		<td>an <code>Else</code> action with a condition</td>
	</tr>
	<tr bgcolor="#aaaaff" valign="top">
		<td>5.</td> <td>&nbsp;&nbsp;<b>Action Three</b></td>
		<td>...</td>
	</tr>
	<tr bgcolor="#aaaaff" valign="top">
		<td>6.</td> 
		<td><b>Else</b><br></td>
		<td></td>
	</tr>
	<tr bgcolor="#aaaaff" valign="top">
		<td>7.</td> <td>&nbsp;&nbsp;<b>Action Four</b><br></td>
		<td>...</td>
	</tr>
</tbody></table>

<p>
Result:  actions One and Two are executed if %fruit matches Apple, Action Three is executed if %fruit matches Pear, otherwise Action Four is executed.
</p>

<p>
Notes:
</p>

<ul>
	<li>you can have as many <code>Else If</code>s in a condition as you like
	</li><li>if your condition is in the middle of a more complicated task, you need to tell Tasker where the condition ends with an <code>End If</code> action
</li></ul>

<h4>Subroutines</h4>

To call another task, use the <code>Perform Task</code> action. To use it as
a subroutine, you just need to ensure that the priority of the calling
task is less than the priority of the called task (more info:
<a href="#scheduling">scheduling</a>).
<p>The parent can optionally pass values to the child and receive a result back:</p>

<p><i>Parent Task</i></p>

<table>
	<tbody><tr bgcolor="#aaaaff" valign="top">
		<td>1.</td> <td>&nbsp;&nbsp;<b>Perform Task</b>
		<br>
		Child,
		<br>
		Priority, 10
		<br>
		%par1,  5,
		<br>
		Result Value Variable, %result
		</td>
		<td>pass 5 to the child, expect a result in %result</td>
	</tr>
	<tr bgcolor="#aaaaff" valign="top">
		<td>2.</td> <td>&nbsp;&nbsp;<b>Variable Flash</b><br>Result: %result
		</td>
	<td>what did we get back ?</td>
</tr></tbody></table>

<p><i>Child Task</i></p>

<table>
	<tbody><tr bgcolor="#aaaaff" valign="top">
		<td>1.</td> <td>&nbsp;&nbsp;<b>Variable Set</b>
		<br>
		%newval, %par1 + 1, Do Maths
		</td>
		<td>add one to the value that was passed</td>
	</tr>
	<tr bgcolor="#aaaaff" valign="top">
		<td>1.</td> <td>&nbsp;&nbsp;<b>Return</b><br>
		%newval
		<br>
	</td><td>set %result in the parent to the value of %newval in the child</td>
	</tr>
</tbody></table>

<p>Result: the parent flashes <b>6</b></p>

<p>Notes:</p>
<ul>
	<li>changes made to <i>%par1</i> and <i>%par2</i> in the child task are <b>not</b> reflected by their changing in the parent task
	</li><li>receiving a return value is optional for the parent, even if the child tries to give it one
	</li><li>unlike <code>Return</code> statements in most computer languages, Tasker's does not necessarily stop the child task, so if the child and parent have the same priority they can both run together and the child return several results over time.
</li></ul>


<a name="encryption.html">

<h2>
	Encryption
	<img style="float:right" src="./Tasker for Android_files/icon_tasker.png">
</h2>

<hr>
<p>
<b>Note:</b> encryption functions are not available on the
Play Store version of Tasker due to US export restrictions.
</p>
<hr>

Tasker has the ability to encrypt and decrypt files. The relevant
actions are in the <i>Encryption</i> action category.

<p>
Since decryption can be automated, you have the possibility to
keep data files encrypted outside of certain times, locations, 
applications etc.
</p>
<p>
<b>Warning</b>: make backups of your files while setting up encryption
until you understand how the system works and are sure the 
encryption/decryption process does not cause any corruption.
</p>

<b>Tip</b>: Tasker does not give progress reports while it's doing
encryption, if you want to know when an long decryption operation
is finished, just put a <i>Vibrate</i> action or similar after the
<i>Encrypt/Decrypt</i> action.

<h4>Keys</h4>

Tasker uses a system of named <i>keys</i>. All of the encryption
actions can specify a key name so that you can use different keys
with different files (if desired).
<p>
If no key name is specified, <b>default</b> is used.
</p>
<p>
Once a passphrase for a key is entered, the ciphers it generated are stored in memory
until explicitly deleted. The deletion might be specified after an <i>Encrypt/
Decrypt File</i> action, or explicitly with the <i>Clear Key</i> action.

</p><h4>Setting Up Encryption</h4>

<h5>General Preferences</h5>

<p>
First thing to do is check whether the encryption preferences for 
<b>Encryption Iterations</b> and <b>Encryption Algorithm</b> are
as you wish. Once you start encryping things, it's time consuming
to start again with new encryption preferences.
</p>
<p>
The preferences can be found at <code>Menu / Prefs / Action</code>.
Be sure to have a look at the help text for each item.
</p>

<h5>Initial Encryption</h5>

To start with, you probably want to encrypt some files which are in 
a particular directory, which you can then decrypt as they are needed.
<p>
To do that, create a task called <b>Encrypt</b> or similar
and add one or more <i>Encrypt File</i> or <i>Encrypt Dir</i> actions to it.
</p>
<p>
By default, the
key is cleared once the file is encrypted, so click 'Leave Key'
for all but the last action, otherwise you'll have to enter your
passphrase for each file.
</p>
</a><p><a name="encryption.html">
Next, </a><a href="#app_widgets.html">create a Tasker shortcut</a> on the home screen, using the <i>Encrypt</i>
task. Tap the widget to encrypt your files. Notice how
you are only asked for the passphrase for the first one, because it
is stored until cleared.
</p>
<p>
The encrypted files will all receive an extension <i>.tec</i>
and the original files are deleted.
</p>

<h4>Decryption</h4>

Once you have a set of encrypted files, you need to setup the contexts
in which they will be decrypted.
<p>
Create another task called <i>Decrypt</i> or similar, and add <i>Decrypt</i>
actions to it to match the encrypt actions you setup previously.
</p>
<p><b>Don't</b> click Clear Key, otherwise you'll have to enter your
passphrase for every file (and at the start of encryption).
</p>

<p>
Now you can use your <i>Encrypt</i> and <i>Decrypt</i> tasks whenever you like. For instance,
you could create a profile with a Location Context and run your <i>Decrypt</i> task
when entering the location (assign Decrypt as the Enter task) and your <i>Encrypt</i>
task when leaving the location (assign <i>Encrypt</i> as the Exit task).
</p>

<p>
<b>Important</b>: when you use the <i>Decrypt</i> action, it recreates the original
file from the encrypted copy, but does <b>not</b> delete the encrypted version.
</p>
<p>
When you re-encrypt the file, if it has not changed it is simply deleted since we
already have an encrypted copy. If it <b>has</b> changed, it is re-encrypted.
</p>
<p>
The purpose of this method of operation is to:
</p><ul>
	<li>avoid the lengthy encryption process when unnecessary</li>
	<li>prevent accidental double-encryption (encrypting the same file twice)</li>
</ul>

<h4><i>Enter Key</i> Action</h4>

It's not always convenient to enter the key at the point at which de- or encryption
takes place. This action allows you to specify the passphrase for a key
at a different point.
<p>
If you don't wish to double-enter a key when encrypting, you can also use this
action before an Encrypt action and not select <i>Confirm</i>.
</p>

<h4><i>Set Key</i> Action</h4>

To allow full-automation of en/decryption, the passphrase for a key can also be set
without user interaction. However, this is much less secure tham <code>Enter Key</code> because:

<ul>
	<li>the passphrase (as part of the action) is stored in <b>clear text</b> in device memory and could be read by the root user if the device OS is compromised
	</li><li>although the passphrase is itself encrypted when a backup is made to SD, the parameters for that encryption can be recovered from the java code in the Tasker apk file
</li></ul>

<h4>Security</h4>

<h5>Algorithm</h5>

Tasker uses symmetric encryption, meaning the same passphrase is used both
to encrypt and decrypt the data.

<p>
The default algorithm is "PBEWithMD5And128BitAES-CBC-OpenSSL".
PBE stands for password-based encryption, see <a href="http://www.ietf.org/rfc/rfc2898.txt">RFC 2898</a>.
</p>
<p>
A salt is combined with the passphrase several hundreds of times using the MD5 algorithm
to produce a key which is used for the 128-bit (default setting) AES algorithm.
</p>
<p>
The number of iterations and algorithm can be set in <code>Menu / Prefs / Action</code>.
</p>

<h5>Pass Phrases</h5>

The longer the passphrase, the more secure the data. Minimally 8 characters of mixed
alphabetic, numeric and punctuation characters is recommended.

<h5>Clearing Keys</h5>

While a key's ciphers are in memory, anyone can use the key for
decryption or encryption if your device is lost or stolen, so it may be wise
to setup a <i>Clear Key</i> action e.g. when the device is turned off
(see Screen Off in the Event Context) or at a particular time (Time Context),
depending on what you are using the encryption for.

<h5>Manually Encrypting/Decrypting</h5>

You can use Tasker's file browser (action Browse Files) to encrypt/decrypt files
directly, via a long-click on the file.

<a name="gestures.html">

<h2>
	Gestures &amp; Shaking
	<img style="float:right" src="./Tasker for Android_files/icon_tasker.png">
</h2>

<h4>General</h4>

<i>Gestures</i> are physical movements of the phone in space, which you first
record by creating a new Event of type <i>Gesture</i> (in the <i>Misc</i> category).

<p>
When you later redo the gesture while using your device, Tasker will carry out
the corresponding task(s) you have attached to its profile.
</p>
<p>
Like normal events, gestures are restricted by other contexts. For example,
if you define a profile with a Gesture (Event) and Application context, the
gesture will only be recognized while using that particular application.
</p>
<p>
Note: it might be a good idea to disable Tasker before setting up
new gestures, as otherwise you are likely to trigger previously defined ones.
</p>

<h4>Recording A Gesture</h4>

<h5>Gesture Points</h5>

First off, it's important to know that Tasker only records the particular points
(which we'll call <i>inflection points</i>) of a gesture that you tell it to.
For example, recording a gesture involving tilting the phone to the left and back
you would record three inflection points: the start, the tilted left position, and
the end (which is the same as the start in this case).

<p>
You can record as many points as you like, but in general it's best to record
only the points where the phone is not moving.
</p>

<h5>Recognized Movements</h5>

Tasker will only recognize changes in the <b>angle</b> of the phone i.e.
<b>tilting</b> to left or right, backwards or forwards, or rotating vertically.
Imagine three poles going through the device in the three dimensions.
<p>
<b>Moving</b> the phone backwards or forwards, up or down or side to side cannot
be recognized.
</p>

<h5>Procedure</h5>
<ol>
<li>create a new Gesture Event and give it a name (so you can differentiate between
different gestures).
</li><li>put the phone in the position where you want the gesture to
start and <b>press-and-hold</b> the <b>Call</b>, <b>Camera</b>, <b>Menu</b>, <b>Search</b> or <b>Volume</b> hardware buttons
to record the point. The device will buzz.
</li><li>move to another (preferably not-moving) point on the path of your gesture, and
press the button again (not a long press). The device will buzz.
</li><li>on the <b>final</b> inflection point, <b>press-and-hold</b> the button
to mark the end of the gesture. The device will buzz again and the "Recorded." 
message should now flash up. 
</li><li>Press <b>Done</b>, and add a Vibrate action so you can hear when your
pattern matches when testing it.
</li></ol>

<h4>Activation</h4>

<h5>Calibration</h5>

Before trying to match a pattern, you probably need to calibrate the hardware
in your device. Go to <code>Menu / Prefs / Monitor / Gestures</code>. Press
the <b>Calibrate</b> button and tilt your phone around in all directions.

<p>
Tasker now has some idea what kind of values the <i>accelerometer</i> in your
phone produces.
</p>
<p>
You only need to calibrate once.
</p>

<h4>Matching</h4>

Now exit Tasker and move your device through the points you previously defined
when recording. You should hear the device vibrate when it reaches the final
recorded point.

<p>
If not, try playing with the values in the Gesture Settings screen. For instance,
you could try raising the Match Radius (but be careful not to raise it too much
or you'll get a lot of matches by mistake).
</p>

<h4>Power Usage</h4>

Tasker does its best to limit power usage of gesture monitoring.
<ul>
<li>monitoring for gestures only takes place when all the
other contexts in a profile are already active (and so the gesture might
have a chance of activating the profile). For example, if you combine an
Application and Gesture (Event) context, gesture monitoring will only
take place while using that particular application.
</li><li>Gesture monitoring is by default turned off when the display is off unless a power source is connected to the device,
unless specified otherwise in <code>Menu / Prefs / Monitor / Display Off Monitoring</code>
</li><li>updates from the accelerometer are at the minumum rate until the start of a gesture is detected.
</li></ul>

</a><a name="icons.html">

<h2>
	Icons
	<img style="float:right" src="./Tasker for Android_files/icon_tasker.png">
</h2>

Tasker can use four categories of icons:

</a><a href="#app">Application</a>, 
<a href="#builtin">Built-In</a>, 
<a href="#ipack">Ipack</a>, 
<a href="#user">User-Installed</a>.

<p>
In some places it's also possible to use any image stored on local media as an icon.
</p>

<a name="app"></a>
<h4>Application Icons</h4>

These are taken from applications installed on the device.
<p>
Minor note: if the icon of the application changes, an update of previously created widgets/shortcuts can
be forced by creating a single widget with the new icon and then rebooting.
</p>

<a name="builtin"></a>
<h4>Built-In Icons</h4>

These come with Tasker and are kept in the device's memory.

<a name="ipack"></a>
<h4>Ipack Icon Sets</h4>

<a href="http://ipack.dinglisch.net/">Ipack</a> is a free, open format for sharing of icon sets between Android applications.
Ipack icon sets can be either installed from <a href="http://market.android.com/search?q=ipack">Play Store</a> or from the <a href="http://ipack.dinglisch.net/download.html">Ipack website</a>. 
<p>
When setting an icon, you will notice an item labelled <i>Download More Icons</i>. Clicking on it will use the appropriate source depending on which version of Tasker you have.
</p>

<a name="user"></a>
<h4>User-Installed Icons</h4>

<p>
You can also install your own icons directly into Tasker's icon directory
<code>/sdcard/Tasker/.icn/</code>. Make sure the icons are in a subdirectory.
The subdirectory should also only be one level deep (no subsubdirectories).
</p>
<p>
Icons must be in PNG format.
</p>
<p>
Example: a two-icon set called <i>Christmas</i> would have the two files
in these locations:
</p>
<blockquote>
<code>/sdcard/Tasker/.icn/Christmas/santa.png</code><br>
<code>/sdcard/Tasker/.icn/Christmas/snowman.png</code>
</blockquote>

<a name="javascript.html">

<h2>
	JavaScript Support
	<img style="float:right" src="./Tasker for Android_files/icon_tasker.png">
</h2>

</a><ul><a name="javascript.html">
	</a><li><a name="javascript.html"></a><a href="#intro">Introduction</a>
	</li><li><a href="#localvars">Local Variables</a>
	</li><li><a href="#globalvars">Global Variables</a>
	</li><li><a href="#array">Arrays</a>
	</li><li><a href="#settings">Settings</a>
	</li><li><a href="#exe">Execution</a>
	</li><li><a href="#offdevice">Working Off-Device</a>
	</li><li><a href="#builtin">Builtin Functions</a>

	<br>
	<a href="#alarmVol">alarmVol</a>
	<a href="#audioRecord">audioRecord</a>
	<a href="#audioRecordStop">audioRecordStop</a>

	<br>
	<a href="#btVoiceVol">btVoiceVol</a>
	<a href="#browseURL">browseURL</a>
	<a href="#button">button</a>

	<br>
	<a href="#call">call</a>
	<a href="#callBlock">callBlock</a>
	<a href="#callDivert">callDivert</a>
	<a href="#callRevert">callRevert</a>
	<a href="#callVol">callVol</a>
	<a href="#carMode">carMode</a>
	<a href="#clearKey">clearKey</a>
	<a href="#composeEmail">composeEmail</a>
	<a href="#composeMMS">composeMMS</a>
	<a href="#composeSMS">composeSMS</a>
	<a href="#convert">convert</a>
	<a href="#createDir">createDir</a>
	<a href="#createScene">createScene</a>
	<a href="#cropImage">cropImage</a>

	<br>
	<a href="#decryptDir">decryptDir</a>
	<a href="#decryptFile">decryptFile</a>
	<a href="#deleteDir">deleteDir</a>
	<a href="#deleteFile">deleteFile</a>
	<a href="#destroyScene">destroyScene</a>
	<a href="#displayAutoBright">displayAutoBright</a>
	<a href="#displayAutoRotate">displayAutoRotate</a>
	<a href="#displayTimeout">displayTimeout</a>
	<a href="#dpad">dpad</a>
	<a href="#dtmfVol">dtmfVol</a>

	<br>
	<a href="#elemBackColour">elemBackColour</a>
	<a href="#elemBorder">elemBorder</a>
	<a href="#elemText">elemText</a>
	<a href="#elemTextColour">elemTextColour</a>
	<a href="#elemTextSize">elemTextSize</a>
	<a href="#elemVisibility">elemVisibility</a>
	<a href="#enableProfile">enableProfile</a>
	<a href="#encryptDir">encryptDir</a>
	<a href="#encryptFile">encryptFile</a>
	<a href="#endCall">endCall</a>
	<a href="#enterKey">enterKey</a>
	<a href="#exit">exit</a>

	<br>
	<a href="#filterImage">filterImage</a>
	<a href="#flash">flash</a>
	<a href="#flashLong">flashLong</a>
	<a href="#flipImage">flipImage</a>

	<br>
	<a href="#getLocation">getLocation</a>
	<a href="#getVoice">getVoice</a>
	<a href="#global">global</a>
	<a href="#goHome">goHome</a>

	<br>
	<a href="#haptics">haptics</a>
	<a href="#hideScene">hideScene</a>

	<br>
	<a href="#listFiles">listFiles</a>
	<a href="#loadApp">loadApp</a>
	<a href="#loadImage">loadImage</a>
	<a href="#local">local</a>
	<a href="#lock">lock</a>

	<br>
	<a href="#mediaControl">mediaControl</a>
	<a href="#mediaVol">mediaVol</a>
	<a href="#micMute">micMute</a>
	<a href="#mobileData">mobileData</a>
	<a href="#musicBack">musicBack</a>
	<a href="#musicPlay">musicPlay</a>
	<a href="#musicSkip">musicSkip</a>
	<a href="#musicStop">musicStop</a>

	<br>
	<a href="#nightMode">nightMode</a>
	<a href="#notificationVol">notificationVol</a>

	<br>
	<a href="#performTask">performTask</a>
	<a href="#popup">popup</a>
	<a href="#profileActive">profileActive</a>
	<a href="#pulse">pulse</a>

	<br>
	<a href="#readFile">readFile</a>
	<a href="#reboot">reboot</a>
	<a href="#resizeImage">resizeImage</a>
	<a href="#ringerVol">ringerVol</a>
	<a href="#rotateImage">rotateImage</a>

	<br>
	<a href="#saveImage">saveImage</a>
	<a href="#say">say</a>
	<a href="#scanCard">scanCard</a>
	<a href="#sendIntent">sendIntent</a>
	<a href="#sendSMS">sendSMS</a>
	<a href="#setAirplaneMode">setAirplaneMode</a>
	<a href="#setAirplaneRadios">setAirplaneRadios</a>
	<a href="#setAlarm">setAlarm</a>
	<a href="#setAutoSync">setAutoSync</a>
	<a href="#setBT">setBT</a>
	<a href="#setBTID">setBTID</a>
	<a href="#setClipboard">setClipboard</a>
	<a href="#setGlobal">setGlobal</a>
	<a href="#setKey">setKey</a>
	<a href="#setLocal">setLocal</a>
	<a href="#settings">settings</a>
	<a href="#setWallpaper">setWallpaper</a>
	<a href="#setWifi">setWifi</a>
	<a href="#shell">shell</a>
	<a href="#showScene">showScene</a>
	<a href="#shutdown">shutdown</a>
	<a href="#silentMode">silentMode</a>
	<a href="#sl4a">sl4a</a>
	<a href="#soundEffects">soundEffects</a>
	<a href="#speakerphone">speakerphone</a>
	<a href="#statusBar">statusBar</a>
	<a href="#stayOn">stayOn</a>
	<a href="#stopLocation">stopLocation</a>
	<!--A HREF="#stopTask">stopTask</A -->
	<a href="#systemLock">systemLock</a>
	<a href="#systemVol">systemVol</a>

	<br>
	<a href="#takeCall">takeCall</a>
	<a href="#takePhoto">takePhoto</a>
	<a href="#taskRunning">taskRunning</a>
	<a href="#type">type</a>

	<br>
	<a href="#usbTether">usbTether</a>
	<a href="#unzip">unzip</a>

	<br>
	<a href="#vibrate">vibrate</a>
	<a href="#vibratePattern">vibratePattern</a>

	<br>
	<a href="#wait">wait</a>
	<a href="#wifiTether">wifiTether</a>
	<a href="#writeFile">writeFile</a>

	<br>
	<a href="#zip">zip</a>

	</li><li><a href="#notes">Function Notes</a>
</li></ul>

<a name="intro">
<h3>Introduction</h3>
</a><p><a name="intro">
Tasker supports running JavaScript code in tasks or </a><a href="#element_web.html">WebView</a> scene elements.
Most Tasker actions can be accessed direct from the JavaScript.
JSON and XMLHTTPRequest are also directly available from the JavaScript code.</p>

<h4>JavaScript in Tasks</h4>

<p>
JavaScript can be embedded inline in tasks via the <i>JavaScriptlet</i> (direct
specification of JavaScript to run) or <i>JavaScript</i> (load script from file)
actions.
</p>

<p>
In both cases, the JavaScript executes in sequence with the other actions in the task
and variables are transparently converted so pieces of JavaScript can be 
interwoven throughout the task.
</p>

<h4>Embedded in HTML</h4>

WebView elements allow specification of mixed HTML and JS for the element
content.

<blockquote>
<code>
&lt;H1 onClick="setWifi( false )"&gt;ClickMeToTurnOffWifi&lt;/H1&gt;
</code>
</blockquote>

<p>
This allows a single WebView to present a complete user-interface.
</p>

<a name="localvars">
<h3>Local Variables</h3>

<p>
In <code>JavaScript(let)</code> actions, local variables (all lower case, e.g. <b>%myvar</b>) are directly accessible in the JavaScript without
the % sign (e.g. <b>myvar</b>). If the script changes the value, the new value is transparently
used by subsequent actions in the task.
</p>
</a><p><a name="localvars">
In JavaScript embedded in HTML, the functions </a><a href="#local">local</a> and
<a href="#setLocal">setLocal</a> must be used to access variables local to the scene hosting the WebView.
</p>

<a name="globalvars">
<h3>Global Variables</h3>

Tasker global variables need to be accessed via </a><a href="#global">global()</a> and set via <a href="#setGlobal">setGlobal()</a>. 

<a name="array">
<h3>Arrays</h3>

<p>
Local Tasker arrays are transparently available in <i>Javascript(let)</i>s and vice-versa.
They are not available in WebViews.
</p>
<p>
Arrays which are not existing Tasker arrays must be declared in the JS as such i.e. in
this case <i>arr</i> will not be visible to the remainder of the task:
</p>

<pre>	var arr = getSomeArray();
</pre>

<p>
Whereas in this case it will:
</p>

<pre>	var arr = [];
	arr = getSomeArray();
</pre>

<p>
Note that:
</p>

<ul>
<li>JavaScript array indices start at 0, whereas Tasker array indices start at 1
</li><li>JavaScript uses <code>[]</code> while Tasker uses <code>()</code>
</li></ul>

<p>
So, for example, <code>%arr(1)</code> (Tasker) is equivalent to <code>arr[0]</code> (JavaScript).
</p>

</a><a name="settings">
<h3>Settings</h3>

Unlike normal Tasker actions, settings which are changed in JavaScript as part of a profile's
enter task are <b>not</b> restored when the profile exits.

</a><a name="exe">
<h3>Execution</h3>

<h4>Execution Instances</h4>

Only one script can execute at one time. Once a piece of
JavaScript is executing, it cannot be interrupted by another
piece.

</a><a name="offdevice">
<h4>Working Off-Device</h4>

You might wish to develop long and/or complicated tasks off-device e.g. on a PC.

There are two strategies for that:

<h4>1. <code>JavaScript</code> action</h4>

For off-device testing, use <code>Menu / More / Developer / Save JS Library Template</code> to get dummy
definitions for the built in functions. Include that file when developing on your PC.
<p>
To test in your JavaScript code whether you're on-device or not, use
</p><blockquote><code>
var onAndroid = ( global( 'sdk' ) &gt; 0 );
</code></blockquote>
<p></p>

<p>
By using the <code>JavaScript</code> action rather than <code>JavaScriptlet</code> you can easily
access a file synced from PC to a file on the Android device.
</p>

<h4>2. Using WebView</h4>

</a><p><a name="offdevice">
If you specify a website URL as the content for your WebView, then testing the
code on the target device is a simple matter of pushing the new version to your webserver and
reloading the WebView on the device (see action </a><a href="#help/ah_scene_element_web_control.html">Element Web Control</a>)
</p>

<h4>Builtin Function Execution</h4>

<p>
Calls to most Tasker builtin functions (see below) are
executed as normal single-action tasks and thus may be blocked
by other executing tasks.
</p>
<p>
They execute at the priority of the task that executed the JavaScript
<b>plus two</b>.
</p>

<h4>JavaScript(let): Alert,Confirm,Prompt</h4>

Scripts using these functions require a 'user-interface' and may cause
interference with the currently running app (though in most cases they
will not).

<h4>JavaScript(let): Auto Exit</h4>

<p>
By default, the <code>JavaScript(let)</code> action will end when the main execution
sequence is finished.
</p>
<p>
If you are using asynchronous code e.g. via <i>setTimeout()</i> or other callbacks,
you should deselect <i>Auto Exit</i>. You are then responsible yourself for telling
Tasker to continue the task by calling <i>exit()</i>.
</p>
<p>
In any case, execution will stop when the timeout configured for the action is reached.
</p>

<h4>JavaScript(let): Libraries</h4>

You can specify as many libraries as you want in the <i>Libraries</i> parameter, 
separated by newlines.
<p>
Several popular libraries are pre-selectable.
</p>
<p>
You may wish to download them manually to your local storage and change the <i>http</i> URL
to a <i>file</i> URL so that Internet is not required to run your script.
</p>

<p>
Important: if you are using your own libraries developed on Windows, you may need to convert
CRLF style line endings to Unix style LF.
</p>

<a name="builtin">
<h3>Builtin Functions</h3>

<p>
Tasker makes most of it's actions available via functions which can be called directly via name
in <code>JavaScript(let)</code> actions and WebView elements.
</p>
<p>
Exception: in WebView content where mode is set to <b>URL</b>, the functions must be prefixed by <b>tk</b> e.g. <code>tk.flash('Woo!')</code>
</p>

<!-- ___________________________________________________________________ -->

</a><a name="alarmVol">
</a><a name="btVoiceVol">
</a><a name="callVol">
</a><a name="dtmfVol">
</a><a name="mediaVol">
</a><a name="notificationVol">
</a><a name="systemVol">
</a><a name="ringerVol">
<h5>alarmVol / btVoiceVol / callVol / dtmfVol / mediaVol / notificationVol / systemVol / ringerVol</h5>

<p>
<code>var ok = alarmVol( int level, bool display, bool sound )</code>
</p>
<p>Set the relevant system volume to <i>level</i>.
</p>
<p>If <i>display</i> is true, the new level will be flashed up on-screen.</p>
<p>If <i>sound</i> is true, a tone will sound at the new level.</p>

<!-- ___________________________________________________________________ -->

</a><a name="audioRecord">
<h5>audioRecord</h5>

<p>
<code>var ok = audioRecord( str destPath, str source, str codec, str format )</code>
</p>
<ul>
<li><i>destPath</i>: where to put the recording. Note that a file extension is not
necessary, it will correspond to the selected <i>format</i>.
</li><li><i>source</i>: <b>def, mic, call, callout</b> or <b>callin</b>
</li><li><i>codec</i>: <b>amrn, amrw</b> or <b>aac</b>
</li><li><i>format</i>: <b>mp4, 3gpp, amrn, amrw</b> or <b>amrr</b>
</li></ul>
<p>
The JavaScript does <b>not</b> wait for the audio recording to complete.
</p>

</a><p><a name="audioRecord">See also: </a><a href="#audioRecordStop">audioRecordStop()</a>.
</p>

<!-- ___________________________________________________________________ -->

<a name="audioRecordStop">
<h5>audioRecordStop</h5>

<p>
<code>var ok = audioRecordStop()</code>
</p>
</a><p><a name="audioRecordStop">
Stop recording previously initiated by </a><a href="#audioRecord">audioRecord()</a>.
</p>

<!-- ___________________________________________________________________ -->

<a name="browseURL">
<h5>browseURL</h5>

<p>
<code>var ok = browseURL( str URL )</code>
</p>
<p>
Open the default browser at the specifed URL.
</p>

<!-- ___________________________________________________________________ -->

</a><a name="button">
<h5>button</h5>

<p>
<code>var ok = button( str name )</code>
</p>
<p>
Simulate a press of the named button.
</p>
<p><i>name</i> must be one of <b>back, call, camera, endcall, menu, volup, voldown</b> or <b>search</b>.
</p><p>
This function requires a rooted device.
</p>

<!-- ___________________________________________________________________ -->

</a><a name="call">
<h5>call</h5>

<p>
<code>var ok = call( str num, bool autoDial )</code>
</p>
<p>
Make a phone call.
</p>
<p>If <i>autoDial</i> is <b>false</b>, the phone app will be brought up with
the number pre-inserted, if <b>true</b> the number will also be dialed.
</p>

<!-- ___________________________________________________________________ -->

</a><a name="callBlock">
<h5>callBlock</h5>

<p>
<code>var ok = callBlock( str numMatch, bool showInfo )</code>
</p>
</a><p><a name="callBlock">
Block <b>outgoing</b> calls </a><a href="#matching.html">matching</a> <i>numMatch</i>.
</p>
<p>
If <i>showInfo</i> is set, Tasker will flash a message when
a call is blocked.
</p>

<!-- ___________________________________________________________________ -->

<a name="callDivert">
<h5>callDivert</h5>

<p>
<code>var ok = callDivert( str fromMatch, str to, bool showInfo )</code>
</p>
</a><p><a name="callDivert">
Divert <b>outgoing</b> calls </a><a href="#matching.html">matching</a> <i>fromMatch</i>
to the number <i>to</i>.
</p>
<p>
If <i>showInfo</i> is set, Tasker will flash a message when
a call is diverted.
</p>

<!-- ___________________________________________________________________ -->

<a name="callRevert">
<h5>callRevert</h5>

<p>
<code>var ok = callRevert( str numMatch )</code>
</p>
</a><p><a name="callRevert">
Stop blocking or diverting outgoing calls previously specified with
</a><a href="#callBlock">callBlock</a> or <a href="#callDivert">callDivert</a>.
</p>

<!-- ___________________________________________________________________ -->

<a name="carMode">
<h5>carMode</h5>

<p>
<code>var ok = carMode( bool onFlag )</code>
</p>
<p>
Turn on or off Android Car Mode.
</p>

<!-- ___________________________________________________________________ -->

</a><a name="clearKey">
<h5>clearKey</h5>

<code>var ok = clearKey( str keyName  )</code>

<p>
Clear the passphrase for the specified <i>keyName</i>.
</p>
</a><p><a name="clearKey">See Also: </a><a href="#encryption.html">Encryption</a> in the Userguide.</p>

<!-- ___________________________________________________________________ -->

<a name="composeEmail">
<h5>composeEmail</h5>

<code>var ok = composeEmail( str to, str subject, str message  )</code>

<p>
Show an email composition dialog with any specified fields pre-filled.
</p>
<p>
The JavaScript does <b>not</b> wait for the email to be sent before continuing.
</p>

<!-- ___________________________________________________________________ -->

</a><a name="composeMMS">
<h5>composeMMS</h5>

<code>var ok = composeMMS( str to, str subject, str message, str attachmentPath )</code>

<p>
Show an MMS composition dialog with any specified fields pre-filled.
</p>
<p>
The JavaScript does <b>not</b> wait for the MMS to be sent before continuing.
</p>

<!-- ___________________________________________________________________ -->

</a><a name="composeSMS">
<h5>composeSMS</h5>

<code>var ok = composeSMS( str to, str message )</code>

<p>
Show an SMS composition dialog with any specified fields pre-filled.
</p>
<p>
The JavaScript does <b>not</b> wait for the SMS to be sent before continuing.
</p>

<!-- ___________________________________________________________________ -->

</a><a name="convert">
<h5>convert</h5>

<code>var result = convert( str val, str conversionType )</code>

<p>
Convert from one type of value to another.
</p>
<p>
<i>conversionType</i> must be one of: <b>byteToKbyte,
		byteToMbyte, byteToGbyte, datetimeToSec, secToDatetime, secToDatetimeM, secToDatetimeL, htmlToText,
		celsToFahr, fahrToCels, inchToCent, metreToFeet, feetToMetre, kgToPound, poundToKg, kmToMile,
		mileToKm, urlDecode, urlEncode, binToDec, decToBin, hexToDec, decToHex, base64encode base64decode,
		toMd5, toSha1, toLowerCase, toUpperCase, toUpperCaseFirst</b>.
</p>
See also: action </a><a href="#help/ah_convert_variable.html">Variable Convert</a>.
<p></p>


<!-- ___________________________________________________________________ -->

<a name="createDir">
<h5>createDir</h5>

<p>
<code>var ok = createDir( str dirPath, bool createParent, bool useRoot )</code>
</p>
<p>
Create the named <i>dirPath</i>. If <i>createParent</i> is specified and any
parent directory does not exist, it will also be created.
</p>
<p>
If <i>useRoot</i> is specified, the operation will be performed as the root user
(where available).
</p>

<!-- ___________________________________________________________________ -->

</a><a name="createScene">
<h5>createScene</h5>

<p>
<code>var ok = createScene( str sceneName )</code>
</p>
</a><p><a name="createScene">
Create the named </a><a href="#scenes.html">scene</a> without displaying it.
</p>

<!-- ___________________________________________________________________ -->

<a name="cropImage">
<h5>cropImage</h5>

<p>
<code>var ok = cropImage( int fromLeftPercent, int fromRightPercent, int fromTopPercent, int fromBottomPercent )</code>
</p>
</a><p><a name="cropImage">
Crop an image in Tasker's image buffer previously loaded via </a><a href="#loadImage">loadImage</a>.
</p>

<!-- ___________________________________________________________________ -->

<a name="decryptDir">
<h5>decryptDir</h5>

<p>
<code>var ok = decryptDir( str path, str key, bool removeKey )</code>
</p>
</a><p><a name="decryptDir">
As </a><a href="#decryptFile">decryptFile()</a>, but decrypts each file in the specified directory
in turn.
</p>

<!-- ___________________________________________________________________ -->

<a name="decryptFile">
<h5>decryptFile</h5>

<p>
<code>var ok = decryptFile( str path, str key, bool removeKey )</code>
</p>
<p>

</p><p>
Decrypt the specified file using the encryption parameters specified in <code>Menu / Prefs / Action</code>.
</p>

<p>
If <i>removeKey</i> is not set, the entered passphrase will be reapplied automatically to the
next encryption/decryption operation with the specified <i>keyName</i>.
</p>
<p>

</p></a><p><a name="decryptFile">See Also: </a><a href="#encryption.html">Encryption</a> in the Userguide, 
<a href="#help/ah_decrypt_file.html">Decrypt File</a> action.</p>

<!-- ___________________________________________________________________ -->

<a name="deleteDir">
<h5>deleteDir</h5>

<p>
<code>var ok = deleteDir( str dirPath, bool recurse, bool useRoot )</code>
</p>
<p>
Delete the named <i>dirPath</i>.  <i>recurse</i>  must be specified if
the directory is not empty.
</p>
<p>
If <i>useRoot</i> is specified, the operation will be performed as the root user
(where available).
</p>

<!-- ___________________________________________________________________ -->

</a><a name="deleteFile">
<h5>deleteFile</h5>

<p>
<code>var ok = deleteFile( str filePath, int shredTimes, bool useRoot )</code>
</p>
<p>
Delete the named <i>filePath</i>.
</p>
<p><i>shredTimes</i> has range 0-10.
</p>
<p>
If <i>useRoot</i> is specified, the operation will be performed as the root user
(where available).
</p>

</a><p><a name="deleteFile">
See also: action </a><a href="#help/ah_delete_file.html">Delete File</a>
</p>

<!-- ___________________________________________________________________ -->

<a name="destroyScene">
<h5>destroyScene</h5>

<p>
<code>var ok = destroyScene( str sceneName )</code>
</p>
</a><p><a name="destroyScene">
Hide the named </a><a href="#scenes.html">scene</a> if it's visible, then destroy it.
</p>

<!-- ___________________________________________________________________ -->

<a name="displayAutoBright">
<h5>displayAutoBright</h5>

<p>
<code>var ok = displayAutoBright( bool onFlag )</code>
</p>

<p>
Whether the display brightness should automatically adjust to the ambient light or not.
</p>

<!-- ___________________________________________________________________ -->

</a><a name="displayAutoRotate">
<h5>displayAutoRotate</h5>

<p>
<code>var ok = displayRotate( bool onFlag )</code>
</p>

<p>
Whether the display orientation should change based on the physical orientation of the device.
</p>

<!-- ___________________________________________________________________ -->

</a><a name="displayTimeout">
<h5>displayTimeout</h5>

<p>
<code>var ok = displayTimeout( int hours, int minutes, int seconds )</code>
</p>

<p>
How long the period of no-activity should be before the display is turned off.
</p>

<!-- ___________________________________________________________________ -->

</a><a name="dpad">
<h5>dpad</h5>

<p>
<code>var ok = dpad( str direction, int noRepeats )</code>
</p>
<p>
Simulate a movement or press of the hardware dpad (or trackball).
</p>
<p><i>direction</i> must be one of <b>up, down, left, right</b> or <b>press</b>.

</p><p>
This function requires a rooted device.
</p>

<!-- ___________________________________________________________________ -->

</a><a name="enableProfile">
<h5>enableProfile</h5>

<p>
<code>var ok = enableProfile( str name, boolean enable )</code>
</p>

<p>
Enable or disable the named Tasker profile.
</p>

<!-- ___________________________________________________________________ -->

</a><a name="encryptDir">
<h5>encryptDir</h5>

<p>
<code>var ok = encryptDir( str path, str keyName, bool rememberKey, bool shredOriginal )</code>
</p>

</a><p><a name="encryptDir">
As </a><a href="#encryptFile">encryptFile()</a>, but encrypts each file in the specified directory
in turn.
</p>

<!-- ___________________________________________________________________ -->

<a name="elemBackColour">
<h5>elemBackColour</h5>

<p>
<code>var ok = elemBackColour( str scene, str element, str startColour, str endColour )</code>
</p>

</a><p><a name="elemBackColour">
Set the background </a><a href="#colour">colour</a> of the specified <a href="#scenes.html">scene</a> element.
</p>
<p>
See also: action <a href="#help/ah_scene_element_background_colour.html">Element Back Colour</a>.
</p>

<!-- ___________________________________________________________________ -->

<a name="elemBorder">
<h5>elemBorder</h5>

<p>
<code>var ok = elemBorder( str scene, str element, int width, str colour )</code>
</p>

</a><p><a name="elemBorder">
Set the border </a><a href="#colour">colour</a> and width of the specified <a href="#scenes.html">scene</a> element.
</p>

<!-- ___________________________________________________________________ -->

<a name="elemText">
<h5>elemText</h5>

<p>
<code>var ok = elemText( str scene, str element, str position, str text )</code>
</p>

</a><p><a name="elemText">
Set the text of the specified </a><a href="#scenes.html">scene</a> element.
</p>
<p>
<i>pos</i> must be one of <b>repl</b> (replace existing text completely), <b>start</b>
(insert before existing text) or <b>end</b> (append after existing text).
</p>
<p>
See also: action <a href="#help/ah_scene_element_text.html">Element Text</a>.
</p>
<!-- ___________________________________________________________________ -->

<a name="elemTextColour">
<h5>elemTextColour</h5>

<p>
<code>var ok = elemTextColour( str scene, str element, str colour )</code>
</p>

</a><p><a name="elemTextColour">
Set the text  </a><a href="#colour">colour</a> of the specified <a href="#scenes.html">scene</a> element.
</p>
<p>
See also: action <a href="#help/ah_scene_element_text_colour.html">Element Text Colour</a>.
</p>


<!-- ___________________________________________________________________ -->

<a name="elemTextSize">
<h5>elemTextSize</h5>

<p>
<code>var ok = elemTextSize( str scene, str element, int size )</code>
</p>

</a><p><a name="elemTextSize">
Set the text size of the specified </a><a href="#scenes.html">scene</a> element.
</p>
<p>
See also: action <a href="#help/scene_element_text_size.html">Element Text Size</a>.
</p>

<!-- ___________________________________________________________________ -->

<a name="elemVisibility">
<h5>elemVisibility</h5>

<p>
<code>var ok = elemVisibility( str scene, str element, boolean visible, int animationTimeMS )</code>
</p>

</a><p><a name="elemVisibility">
Make the specified </a><a href="#scenes.html">scene</a> element visible or invisible.
</p>
<p>
See also: action <a href="#help/ah_scene_element_visibility.html">Element Visibility</a>.
</p>

<!-- ___________________________________________________________________ -->

<a name="endCall">
<h5>endCall</h5>

<p>
<code>var ok = endCall()</code>
</p>

<p>
Terminate the current call (if there is one).
</p>

<!-- ___________________________________________________________________ -->

</a><a name="encryptFile">
<h5>encryptFile</h5>

<p>
<code>var ok = encryptFile( str path, str keyName, bool rememberKey, bool shredOriginal )</code>
</p>

<p>
Encrypt the specified file using the encryption parameters specified in <code>Menu / Prefs / Action</code>.
</p>

<p>
If <i>rememberKey</i> is set, the entered passphrase will be reapplied automatically to the
next encryption/decryption operation with the specified <i>keyName</i>.
</p>
<p>
If <i>shredOriginal</i> is specified, the original file will be overwritten several
times with random bits if encryption is successful.
</p>
</a><p><a name="encryptFile">See Also: </a><a href="#encryption.html">Encryption</a> in the Userguide, 
<a href="#help/ah_encrypt_file.html">Encrypt File</a> action.</p>

<!-- ___________________________________________________________________ -->

<a name="enterKey">
<h5>enterKey</h5>

<p>
<code>var ok = enterKey( str title, str keyName, bool showOverKeyguard, bool confirm, str background, str layout, int timeoutSecs )</code>
</p>

<p>
Show a dialog to enter the passphrase for the specified <i>keyName</i>. The JavaScript waits 
until the dialog has been dismissed or the timeout reached.
</p>

</a><ul><a name="enterKey">
<li><i>confirm</i>: if set, the passphrase must be entered twice to ensure it is correct.
</li><li><i>background</i>: [optional] a file path or file URI to a background image.
</li></a><li><a name="enterKey"><i>layout</i>: the name of a user-created </a><a href="#scenes.html">scene</a> to use in place of the built-in scene.
</li></ul>

<p>See Also: <a href="#encryption.html">Encryption</a> in the Userguide</p>

<!-- ___________________________________________________________________ -->

<a name="filterImage">
<h5>filterImage</h5>

<p>
<code>bool ok = filterImage( str mode, int value )</code>
</p>

</a><p><a name="filterImage">
Filter an image previously loaded into Tasker's image buffer via
</a><a href="#loadImage">loadImage()</a></p>
<p></p>


<p>
Possible values of <i>mode</i> are:
</p>

<ul>
<li><b>bw</b>: convert to black &amp; white, using <i>value</i> as a threshold
</li><li><b>eblue</b>: enhance blue values by <i>value</i>
</li><li><b>egreen</b>: enhance green values by <i>value</i>
</li><li><b>ered</b>: enhance red values by <i>value</i>
</li><li><b>grey</b>: convert to greyscale, <i>value</i> is unused
</li><li><b>alpha</b>: set pixel alpha (opposite of transparency) to <i>value</i>
</li></ul>

<p><i>value</i> should be 1-254.</p>
<!-- ___________________________________________________________________ -->

<a name="flipImage">
<h5>flipImage</h5>

<p>
<code>bool ok = flipImage( bool horizontal )</code>
</p>

</a><p><a name="flipImage">
Flip an image previously loaded into Tasker's image buffer via
</a><a href="#loadImage">loadImage()</a></p>
<p></p>
<p>
If <i>horizontal</i> is false, the image is flipped vertically.
</p>

<!-- ___________________________________________________________________ -->

<a name="exit">
<h5>exit</h5>

<p>
<code>exit()</code>
</p>

<p>
Stop execution of the JavaScript.
</p>

<!-- ___________________________________________________________________ -->

</a><a name="flash">
<h5>flash</h5>

<p>
<code>flash( str message )</code>
</p>

Flash a short-duration Android 'Toast' message.

<!-- ___________________________________________________________________ -->

</a><a name="flashLong">
<h5>flashLong</h5>

<p>
<code>flashLong( str message )</code>
</p>

Flash a long-duration Android 'Toast' message.

<!-- ___________________________________________________________________ -->

</a><a name="getLocation">
<h5>getLocation</h5>

<p>
<code>var ok = getLocation( str source, bool keepTracking, int timeoutSecs )</code>
</p>

<p>
Try to get a fix of the current device location.
</p>
<p><i>source</i> must be one of <b>gps, net</b> or <b>any</b>.
</p>
<p>
If <i>keepTracking</i> is set, the specified source(s) will be left tracking
with the purpose of providing a much quicker fix next time the function is
called.
</p>
</a><p><a name="getLocation">
Fix coordinates are stored in the global Tasker variables <b>%LOC</b> (GPS) and/or <b>%LOCN</b> (Net).
The value can be retrieved with the </a><a href="#global">global</a> function. Several other
parameters of the fix are also available, see <a href="#variables.html">Variables</a>.
</p>

<p>Example</p>
<pre><code>
	var lastFix = global( 'LOC' );
	if ( 
		getLocation( 'gps' ) &amp;&amp;
		( global( 'LOC' ) != lastFix ) 
	) {
		flash( "New fix: " + global( 'LOC' ) );
	}
</code>
</pre>

<p>
See also: action <a href="#help/ah_get_fix.html">Get Location</a>, function <a href="#stopLocation">stopLocation</a>.
</p>

<!-- ___________________________________________________________________ -->

<a name="getVoice">
<h5>getVoice</h5>

<p>
<code>str result = getVoice( str prompt, str languageModel, int timeout )</code>
</p>

<p>
Get voice input and convert to text.
</p>
<p>
<i>result</i> is 'undefined' if the voice acquisition failed, otherwise
it's an array of possible matching texts.
</p>
<p>
<i>prompt</i> is a label for the dialog that is shown during voice acquisition.
</p>
<p>
<i>languageMode</i> gives the speech recognition engine a clue as to the
context of the speech. It must be one of <b>web</b> for 'web search' or
<b>free</b> for 'free-form'.
</p>

<!-- ___________________________________________________________________ -->

</a><a name="goHome">
<h5>goHome</h5>

<p>
<code>goHome( int screenNum )</code>
</p>

<p>
Go to the Android home screen. <i>screenNum</i> is not supported by all
home screens.
</p>

<!-- ___________________________________________________________________ -->

</a><a name="haptics">
<h5>haptics</h5>

<p>
<code>var ok = haptics( bool onFlag )</code>
</p>
<p>
Enable/disable system setting Haptic Feedback.
</p>

<!-- ___________________________________________________________________ -->

</a><a name="hideScene">
<h5>hideScene</h5>

<p>
<code>var ok = hideScene( str sceneName )</code>
</p>
</a><p><a name="hideScene">
Hide the named </a><a href="#scenes.html">scene</a> if it's visible.
</p>

<!-- ___________________________________________________________________ -->

<a name="global">
<h5>global</h5>

<code>var value = global( str varName )</code>

<p>
Retrieve the value of a Tasker global variable. Prefixing the name with % is optional.
</p>

<!-- ___________________________________________________________________ -->

</a><a name="listFiles">
<h5>listFiles</h5>

<p>
<code>str files = listFiles( str dirPath, bool hiddenToo )</code>
</p>

<p>
List all files in the specified <i>dirPath</i>.
</p>
<p>
<i>files</i> is a newline-separated list of subfiles.
</p>

<p></p>If <i>hiddenToo</i> is specified, files starting with period are
included, otherwise they are not.
<p></p>

<p>Example:
</p>
<pre>	var files = listFiles( '/sdcard' );
	var arr = files.split( '\n' );
	flash( 'Found ' + arr.length + ' files' );
</pre>

<!-- ___________________________________________________________________ -->

</a><a name="loadApp">
<h5>loadApp</h5>

<p>
<code>var ok = loadApp( str name, str data, bool excludeFromRecents )</code>
</p>

<p>
Start up the named app.
</p>

<p>
<i>Name</i> can be a package name or app label, it's tested first against
known package names. <b>Note</b>: app label could be localized to another
language if the script is used in an exported app.
</p>
<p>
<i>Data</i> is in URI format and app-specific.
</p>
<p>
When <i>excludeFromRecents</i> is true, the app will not appear in the home screen
'recent applications' list.
</p>

<!-- ___________________________________________________________________ -->

</a><a name="loadImage">
<h5>loadImage</h5>

<p>
<code>var ok = loadImage( str uri )</code>
</p>

<p>
Load an image into Tasker's internal image buffer.
</p>
<p>
The following uri formats are currently supported:
</p>

<ul>
	<li><i>file://</i> followed by a local file path
</li></ul>

</a><p><a name="loadImage">
See also </a><a href="#help/ah_load_image.html">Load Image</a> action.</p>
<p></p>

<!-- ___________________________________________________________________ -->

<a name="lock">
<h5>lock</h5>

<p>
<code>var ok = lock( str title, str code, bool allowCancel, bool rememberCode, bool fullScreen, str background, str layout )</code>
</p>

<p>
Show a lock screen, preventing user interaction with the covered part of the screen. The JavaScript waits until the 
code has been entered or the lock cancelled (see below).
</p>
</a><ul><a name="lock">
<li><i>code</i>: the numeric code which must be entered for unlock
</li><li><i>allowCancel</i>: show a button to remove the lockscreen, which causes a return to the Android home screen
</li><li><i>rememberCode</i>: the code will be remembered and automatically entered when the lock screen is show in future,
until the display next turns off
</li><li><i>background</i>: [optional] a file path or file URI to a background image.
</li></a><li><a name="lock"><i>layout</i>: the name of a user-created </a><a href="#scenes.html">scene</a> to use in place of the built-in lock scene
</li></ul>

<!-- ___________________________________________________________________ -->

<a name="local">
<h5>local</h5>

<code>var value = local( str varName )</code>

<p>
Retrieve the value of a Tasker scene-local variable. Prefixing the name with % is optional.
</p>

<p>
This function is only for use by JavaScript embedded in HTML and accessed via
a WebView scene element.
</p>

<!-- ___________________________________________________________________ -->

</a><a name="mediaControl">
<h5>mediaControl</h5>

<code>var ok = mediaControl( str action )</code>

<p>
Control media via simulation of hardware buttons.
</p>
<p>
Possible <i>action</i>s are <b>next, pause, prev, toggle</b> or <b>stop</b>.
</p>

<!-- ___________________________________________________________________ -->

</a><a name="micMute">
<h5>micMute</h5>

<code>var ok = micMute( bool shouldMute )</code>

<p>
Mute or unmute the device's microphone (if present),
</p>

<!-- ___________________________________________________________________ -->

</a><a name="mobileData">
<h5>mobileData</h5>

<code>var ok = mobileData( bool set )</code>

<p>
Enable or disable the system Mobile Data setting.
</p>
</a><p><a name="mobileData">
See also: action </a><a href="#help/ah_mobile_data_direct.html">Mobile Data</a> 

<!-- ___________________________________________________________________ -->

<a name="musicBack">
</a></p><h5><a name="musicBack">musicBack</a></h5><a name="musicBack">

<code>var ok = musicBack( int seconds )</code>

</a><p><a name="musicBack">
Skip back by <i>seconds</i> during playback of a music file previously started by </a><a href="#musicPlay">musicPlay</a>.
</p>
<p>
See also: <a href="#musicSkip">musicSkip</a>, <a href="#musicStop">musicStop</a>
</p>

<!-- ___________________________________________________________________ -->

<a name="musicPlay">
<h5>musicPlay</h5>

<code>var ok = musicPlay( str path, int offsetSecs, bool loop, str stream )</code>

<p>
Play a music file via Tasker's internal music player.
</p>

</a><p><a name="musicPlay">
<i>stream</i> to which </a><a href="#streams">audio stream</a> the music should be played
</p>

<p>This function does <b>not</b> not wait for completion.</p>

<p>The last 3 arguments may be ommitted, in which case they default to <b>0</b>,
<b>false</b> and <b>media</b> respectively.
</p>

<p>
See also: <a href="#musicStop">musicStop</a>, <a href="#musicBack">musicBack</a>,
<a href="#musicSkip">musicSkip</a>
</p>

<!-- ___________________________________________________________________ -->

<a name="musicSkip">
<h5>musicSkip</h5>

<code>var ok = musicSkip( int seconds )</code>

</a><p><a name="musicSkip">
Skip forwards by <i>seconds</i> during playback of a music file previously started by </a><a href="#musicPlay">musicPlay</a>.
</p>
<p>
See also: <a href="#musicBack">musicBack</a>, <a href="#musicStop">musicStop</a>
</p>

<!-- ___________________________________________________________________ -->

<a name="musicStop">
<h5>musicStop</h5>

<code>var ok = musicStop()</code>

</a><p><a name="musicStop">
Stop playback of a music file previously started by </a><a href="#musicPlay">musicPlay</a>.
</p>
<p>
See also: <a href="#musicBack">musicBack</a>, <a href="#musicSkip">musicSkip</a>
</p>

<!-- ___________________________________________________________________ -->

<a name="nightMode">
<h5>nightMode</h5>

<p>
<code>var ok = nightMode( bool onFlag )</code>
</p>
<p>
Turn on or off Android Night Mode.
</p>

<!-- ___________________________________________________________________ -->

</a><a name="popup">
<h5>popup</h5>

<p>
<code>var ok = popup( str title, str text, bool showOverKeyguard, str background, str layout, int timeoutSecs )</code>
</p>

<p>
Show a popup dialog. The JavaScript waits until the popup has been dismissed or the timeout reached.
</p>
</a><ul><a name="popup">
<li><i>background</i>: [optional] a file path or file URI to a background image.
</li></a><li><a name="popup"><i>layout</i>: the name of a user-created </a><a href="#scenes.html">scene</a> to use in place of the built-in popup scene.
</li></ul>

<!-- ___________________________________________________________________ -->

<a name="performTask">
<h5>performTask</h5>

<code>var ok = performTask( str taskName, int priority, str parameterOne, str parameterTwo )</code>

<p>
Run the Tasker task <i>taskName</i>.
</p>
<p>
Note that the JavaScript does not wait for the task to complete.
</p>

<!-- ___________________________________________________________________ -->

</a><a name="profileActive">
<h5>profileActive</h5>

<code>bool active = profileActive( str profileName )</code>

<p>
Whether the named Tasker profile is currently active. Returns false if
the profile name is unknown.
</p>

<!-- ___________________________________________________________________ -->

</a><a name="pulse">
<h5>pulse</h5>

<code>bool ok = pulse( bool onFlag )</code>

<p>
Enable or disable the Android Notification Pulse system setting.
</p>

<!-- ___________________________________________________________________ -->

</a><a name="readFile">
<h5>readFile</h5>

<code>var contents = readFile( str path )</code>

<p>
Read the contents of a text file.
</p>

<!-- ___________________________________________________________________ -->

</a><a name="reboot">
<h5>reboot</h5>

<code>var ok = reboot( str type )</code>

<p>
Reboot the device.
</p>
<p><i>type</i> is one of <b>normal, recovery</b> or <b>bootloader</b>.
It can be ommitted and defaults to <b>normal</b>.
</p><p>
Requires a rooted device.
</p>

</a><p><a name="reboot">
See also: function </a><a href="#shutdown">shutdown</a>

<!-- ___________________________________________________________________ -->

<a name="resizeImage">
</a></p><h5><a name="resizeImage">resizeImage</a></h5><a name="resizeImage">

<code>var ok = resizeImage( int width, int height )</code>

<p>
Scale the current image in Tasker's image buffer to the specified dimensions.
</p>

<!-- ___________________________________________________________________ -->

</a><a name="rotateImage">
<h5>rotateImage</h5>

<code>var ok = rotateImage( str dir, int degrees )</code>

<p>
Rotate the current image in Tasker's image buffer.
</p>
<p>
<i>dir</i> must be one of <b>left</b> or <b>right</b>.
<i>degrees</i> must be one of <b>45, 90, 135</b> or <b>180</b>.
</p>

<!-- ___________________________________________________________________ -->

</a><a name="saveImage">
<h5>saveImage</h5>

<code>var ok = saveImage( str path, int qualityPercent, bool deleteFromMemoryAfter  )</code>

<p>
Save the current image in Tasker's image buffer to the specified file <i>path</i>.
</p>
</a><p><a name="saveImage">
</a><a href="#help/ah_save_image.html">Save Image</a> action.</p>
<p></p>

<!-- ___________________________________________________________________ -->

<a name="say">
<h5>say</h5>

<code>var ok = say( str text, str engine, str voice, str stream, int pitch, int speed )</code>

<p>
Cause the device to say <i>text</i> out loud.
</p>
</a><ul><a name="say">
<li><i>engine</i>: the speech engine e.g. <b>com.svox.classic</b>  Defaults to the system default. 
</li><li><i>voice</i>: the voice to use (must be supported by <i>engine</i>). Defaults to the current system language.
</li></a><li><a name="say"><i>stream</i>: to which </a><a href="#streams">audio stream</a> the speech should be made
</li><li><i>pitch</i>: 1-10
</li><li><i>speed</i>: 1-10
</li></ul>
<p>
The script waits for the speech to be finished.
</p>

<!-- ___________________________________________________________________ -->

<a name="sendIntent">
<h5>sendIntent</h5>

<code>var ok = sendIntent( str action, str targetComp, str package, str class, str category, str data, str mimeType, str[] extras );</code>

<p>
Send an intent. Intents are Android's high-level application interaction system.
</p>
<p>
Any parameter may be specified as undefined.
</p>
<ul>
<li><i>targetComp</i>: the type of application component to target, one of <b>receiver, activity</b> or <b>service</b>.
Defaults to <b>receiver</b>.
</li><li><i>package</i>: the application package to limt the intent to
</li><li><i>class</i>: the application class to limit the intent to
</li><li><i>category</i>: one of <b>none, alt, browsable, cardock, deskdock, home, info, launcher, preference, selectedalt, tab</b> or <b>test</b>,
defaults to <b>none</b>
</li><li><i>extras</i>: extra data to pass, in the format key:value. May be undefined. Maximum length 2.
</li></ul>

</a><p><a name="sendIntent">
See also: action </a><a href="#help/ah_send_intent.html">Send Intent</a>.
</p>
<!-- ___________________________________________________________________ -->

<a name="sendSMS">
<h5>sendSMS</h5>

<code>var ok = sendSMS( str number, str text, boolean storeInMessagingApp );</code>

<p>
Send an SMS.
</p>

</a><p><a name="sendSMS">
See also: action </a><a href="#help/ah_send_sms.html">Send SMS</a>
</p>

<!-- ___________________________________________________________________ -->

<a name="setAirplaneMode">
<h5>setAirplaneMode</h5>

<code>var ok = setAirplaneMode( bool setOn )</code>

<p>
Enable or disable Airplane Mode.
</p>


<p>
Get the current value with:
</p>

<p>
<code>
var enabled = global( 'AIR' );
</code>
</p>
</a><p><a name="setAirplaneMode">See also: function </a><a href="#setAirplaneRadios">setAirplaneRadios</a>
</p>

<!-- ___________________________________________________________________ -->

<a name="setAirplaneRadios">
<h5>setAirplaneRadios</h5>

<code>var ok = setAirplaneRadios( str disableRadios )</code>

<p>
Specify the radios which will be <b>disabled</b> when the device enters
Airplane Mode.
</p>

<p><i>disableRadios</i> is a comma-separated list with radio names from
the following set: <b>cell, nfc, wifi, wimax, bt</b>.
</p>

<p>
Get the current value with:
</p>

<p>
<code>
var radios = global( 'AIRR' );
</code>
</p>

</a><p><a name="setAirplaneRadios">See also: function </a><a href="#setAirplaneMode">setAirplaneMode</a>
</p>


<!-- ___________________________________________________________________ -->

<a name="setAlarm">
<h5>setAlarm</h5>

<code>var ok = setAlarm( int hour, int min, str message, bool confirmFlag )</code>

<p>
Create an alarm in the default alarm clock app.
</p>
<p> <i>confirmFlag</i> specifies whether the app should confirm that the alarm has been set.  </p>
<p><i>message</i> is optional. </p><p>
Requires Android version 2.3+.
</p>

<!-- ___________________________________________________________________ -->

</a><a name="setAutoSync">
<h5>setAutoSync</h5>

<code>var ok = setAutoSync( bool setOn )</code>

<p>
Enable or disable the global auto-sync setting.
</p>

<!-- ___________________________________________________________________ -->

</a><a name="scanCard">
<h5>scanCard</h5>

<p>
<code>var ok = scanCard( str path )</code>
</p>

<p>
Force the system to scan the external storage card for new/deleted media.
</p>
<p>
If <i>path</i> is defined, only that will be scanned.
</p>
</a><p><a name="scanCard">
See also: action </a><a href="#help/ah_scan_card.html">Scan Card</a>
</p>

<!-- ___________________________________________________________________ -->

<a name="setBT">
<h5>setBT</h5>

<p>
<code>var ok = setBT( bool setOn )</code>
</p>

<p>
Enable or disable the Bluetooth radio (if present).
</p>
<p>
Test BT state with:
</p>
<p>
<code>
if ( global( 'BLUE' ) == "on" ) { doSomething(); }
</code>
</p>

<!-- ___________________________________________________________________ -->

</a><a name="setBTID">
<h5>setBTID</h5>

<p>
<code>var ok = setBTID( str toSet )</code>
</p>

<p>
Set the bluetooth adapter ID (the name as seen by other devices).
</p>

<!-- ___________________________________________________________________ -->

</a><a name="setGlobal">
<h5>setGlobal</h5>

<code>setGlobal( str varName, str newValue )</code>

<p>
Set the value of a Tasker global user variable. Prefixing varName with % is optional.
</p>

<!-- ___________________________________________________________________ -->

</a><a name="setKey">
<h5>setKey</h5>

<code>var ok = setKey( str keyName, str passphrase  )</code>

<p>
Set the passphrase for the specified <i>keyName</i>.
</p>
</a><p><a name="setKey">See Also: </a><a href="#encryption.html">Encryption</a> in the Userguide.</p>

<!-- ___________________________________________________________________ -->

<a name="setLocal">
<h5>setLocal</h5>

<code>setLocal( str varName, str newValue )</code>

<p>
Set the value of a Tasker <b>scene-local</b> user variable. Prefixing varName with % is optional.
</p>
<p>
This function is only for use by JavaScript embedded in HTML and accessed via
a WebView scene element.
</p>

<!-- ___________________________________________________________________ -->

</a><a name="setClipboard">
<h5>setClipboard</h5>

<code>var ok = setClipboard( str text, bool appendFlag )</code>

<p>
Set the global system clipboard.
</p>
<p>
Test the value with:
</p><p>
<code>
var clip = global( 'CLIP' );
</code>
</p>
<!-- ___________________________________________________________________ -->

</a><a name="settings">
<h5>settings</h5>

<code>var ok = settings( str screenName )</code>

<p>
Show an Android System Settings screen.
</p>
<p><i>screenName</i> must be one of <b>all, accessibility, addacount, airplanemode, 
apn, app, batteryinfo, appmanage
bluetooth, date, deviceinfo, dictionary, display, inputmethod, internalstorage,
locale, location, memorycard, networkoperator, powerusage, privacy, quicklaunch, 
security, mobiledata, search, sound, sync, wifi, wifiip</b> or <b>wireless</b>.
</p>

<!-- ___________________________________________________________________ -->

</a><a name="setWallpaper">
<h5>setWallpaper</h5>

<code>var ok = setWallpaper( str path )</code>

<p>
Set the system home screen wallpaper.
</p>

<!-- ___________________________________________________________________ -->

</a><a name="setWifi">
<h5>setWifi</h5>

<p>
<code>var ok = setWifi( bool setOn )</code>
</p>

<p>
Enable or disable the Wifi radio (if present).
</p>
<p>
Test wifi state with:
</p>
<p>
<code>
if ( global( 'WIFI' ) == "on" ) { doSomething(); }
</code>
</p>


<!-- ___________________________________________________________________ -->

</a><a name="shell">
<h5>shell</h5>

<code>var output = shell( str command, bool asRoot, int timoutSecs )</code>

<p>
Run the shell command <i>command</i>.
</p>
<p>
<i>asRoot</i> will only have effect if the device is rooted.
</p>
<p>
<i>output</i> is 'undefined' if the shell command failed. It's maximum size is
restricted to around 750K.
</p>

<!-- ___________________________________________________________________ -->

</a><a name="showScene">
<h5>showScene</h5>

<code>var ok = showScene( str name, str displayAs, int hoffset, int voffset, bool showExitIcon, bool waitForExit )</code>

</a><p><a name="showScene">
Show the named </a><a href="#scenes.html">scene</a>, creating it first if necessary.
</p>
<ul>
<li><i>displayAs</i>: options: <code>Overlay, OverBlocking, OverBlockFullDisplay, Dialog, DialogBlur, DialogDim, 
			ActivityFullWindow, ActivityFullDisplay, ActivityFullDisplayNoTitle</code>
</li><li><i>hoffset, voffset</i>: percentage vertical and horizontal offset for the scene -100% to 100% (not relevant for
full screen/window display types)
</li><li><i>showExitIcon</i>: display a small icon in the bottom right which destroys the scene when pressed
</li><li><i>waitForExit</i>: whether to wait for the scene to exit before continuing the script
</li></ul>

<!-- ___________________________________________________________________ -->

<a name="shutdown">
<h5>shutdown</h5>

<code>var ok = shutdown()</code>

<p>
Shutdown the device.
</p>
<p>
Requires a rooted device.
</p>

</a><p><a name="shutdown">See also: </a><a href="#reboot">reboot</a></p>

<!-- ___________________________________________________________________ -->

<a name="silentMode">
<h5>silentMode</h5>

<code>var ok = silentMode( str mode )</code>

<p>
Set the system silent ('ringer') mode.
</p>
<p><i>mode</i> must be one of <b>off, vibrate</b> or <b>on</b></p>

<!-- ___________________________________________________________________ -->

</a><a name="sl4a">
<h5>sl4a</h5>

<code>var ok = sl4a( str scriptName, boolean inTerminal )</code>

</a><p><a name="sl4a">
Run a previously created </a><a href="https://code.google.com/p/android-scripting/">SL4A</a> script.
</p>

<!-- ___________________________________________________________________ -->

<a name="soundEffects">
<h5>soundEffects</h5>

<code>var ok = soundEffects( bool setTo )</code>

<p>
Setting the system <i>Sound Effects</i> setting (sound from clicking on
buttons etc.
</p>
<p></p>

<!-- ___________________________________________________________________ -->

</a><a name="speakerphone">
<h5>speakerphone</h5>

<code>var ok = speakerPhone( bool setFlag )</code>

<p>
Enable or disable the speakerphone function.
</p>

<!-- ___________________________________________________________________ -->

</a><a name="statusBar">
<h5>statusBar</h5>

<code>var ok = statusBar( bool expanded )</code>

<p>
Expand or contract the system status bar.
</p>

<!-- ___________________________________________________________________ -->

</a><a name="stayOn">
<h5>stayOn</h5>

<code>var ok = stayOn( str mode )</code>

<p>
Specify whether the device should remain on when power is connected.
</p>
<p>
Possible <i>mode</i>s are <b>never, ac, usb, any</b>.
</p>

<!-- ___________________________________________________________________ -->

</a><a name="stopLocation">
<h5>stopLocation</h5>

<code>var ok = stopLocation()</code>

</a><p><a name="stopLocation">
Stop tracking a location provider. This is only relevant when a </a><a href="#getLocation">getLocation</a>
function has been previously called with the <i>keepTracking</i> parameter set.
</p>

<!-- ___________________________________________________________________ -->

<!-- A NAME="stopTask" />
<H5>stopTask</H5>

<CODE>var ok = stopTask( bool err )</CODE>

<P>
Stop the task (and therefore also the JavaScript) that the JavaScript is part off
</P -->

<!-- ___________________________________________________________________ -->

<a name="systemLock">
<h5>systemLock</h5>

<code>var ok = systemLock()</code>

<p>
Turn off the display and activate the keyguard.
</p>
<p>
Requires Tasker's Device Administrator to be enabled in Android settings.
</p>

<!-- ___________________________________________________________________ -->

</a><a name="taskRunning">
<h5>taskRunning</h5>

<code>bool running = taskRunning( str taskName )</code>

<p>
Whether the named Tasker task is currently running. Returns false if
the task name is unknown.
</p>

<!-- ___________________________________________________________________ -->

</a><a name="takeCall">
<h5>takeCall</h5>

<p>
<code>bool ok = takeCall();</code>
</p>

<p>
Auto-accept an incoming call (if there is one).
</p>

<!-- ___________________________________________________________________ -->

</a><a name="takePhoto">
<h5>takePhoto</h5>

<p>
<code>bool ok = takePhoto( int camera, str resolution, str filePath, bool insertGallery )</code>
</p>

<p>
Take a photo with the builtin camera.
</p>
</a><ul><a name="takePhoto">
<li><i>camera</i>: 0 = rear camera, 1 = front camera
</li><li><i>resolution</i>: format WxH e.g. 640x840
</li></a><li><a name="takePhoto"><i>filePath</i>: </a><a href="#paths">see here</a>
</li><li><i>insertGallery</i>: whether to insert the resulting picture in the Android Gallery application
</li></ul>
<p>
</p>

<!-- ___________________________________________________________________ -->

<a name="type">
<h5>type</h5>

<p>
<code>var ok = type( str text, int repeatCount )</code>
</p>
<p>
Simulate keyboard typing.
</p>

<p>
Requires a rooted device.
</p>

<!-- ___________________________________________________________________ -->

</a><a name="unzip">
<h5>unzip</h5>

<code>boolean ok = unzip( str zipPath, bool deleteZipAfter )</code>

<p>
Unpack a Zip archive into the parent directory of the archive.
</p>
<p>
<i>deleteZip</i> causes the zip archive to be deleted after successful
unpacking.
</p>

<!-- ___________________________________________________________________ -->

</a><a name="usbTether">
<h5>usbTether</h5>

<code>usbTether( bool set )</code>

<p>
Enable or disable USB tethering.
</p>

</a><p><a name="usbTether">
See also: action </a><a href="#help/ah_tether_usb.html">USB Tether</a>
</p>

<!-- ___________________________________________________________________ -->

<a name="vibrate">
<h5>vibrate</h5>

<code>vibrate( int durationMilliseconds )</code>

<p>
Cause the device to vibrate for the specified time.
</p>

<!-- ___________________________________________________________________ -->

</a><a name="vibratePattern">
<h5>vibratePattern</h5>

<code>vibratePattern( str pattern )</code>

<p>
Cause the device to vibrate following the specified <i>pattern</i>, which
consists of a sequence of off then on millisecond durations e.g.
</p>
<p>
<code>500,1000,750,1000</code>
</p>
<p>
wait for 500ms, vibrates 1000ms, wait for 750ms, then vibrate for 1000ms.
</p>

<!-- ___________________________________________________________________ -->

</a><a name="wait">
<h5>wait</h5>

<code>wait( int durationMilliseconds )</code>

<p>
Pause the script for the specified time.
</p>

<p>
Warning: may cause some preceeding functions not to complete in some situations.
If in doubt, use JavaScript setTimeout() instead.
</p>

<!-- ___________________________________________________________________ -->

</a><a name="wifiTether">
<h5>wifiTether</h5>

<code>var ok = wifiTether( bool set )</code>

<p>
Enable or disable Wifi tethering.
</p>

</a><p><a name="wifiTether">
See also: action </a><a href="#help/ah_tether_wifi.html">Wifi Tether</a>
</p>

<!-- ___________________________________________________________________ -->

<a name="writeFile">
<h5>writeFile</h5>

<code>var ok = writeFile( str path, str text, bool append )</code>

<p>
Write <i>text</i> to file <i>path</i>.
</p>
<p>If <i>append</i> is specified, the text will be attached to the
end of the existing file contents (if there are any).
</p>

<!-- ___________________________________________________________________ -->

</a><a name="zip">
<h5>zip</h5>

<code>boolean ok = zip( str path, int level, bool deleteOriginalAfter )</code>

<p>
Zip a file or directory. 
</p>
<p>
<i>level</i> is the desired compression level from 1-9, with 9 resulting
in the smallest file and the longest compression time.
</p>
<p>
<i>deleteOriginal</i> causes <i>path</i> to be deleted if the zip operation
is successful.
</p>


<!-- ___________________________________________________________________ -->

</a><a name="notes">
<h3>Notes</h3>

</a><a name="stream">
<h4>Audio Streams</h4>

Must be one of <b>call, system, ringer, media, alarm</b> or <b>notification</b>

</a><a name="colour">
<h4>Colours</h4>

Colours are specified in <i>AARRGGBB</i> hexadecimal format, with solid white being <b>FFFFFFFF</b>.

</a><a name="paths">
<h4>File Paths</h4>

File paths can be specified as either absolute (start with <b>/</b>) or
relative (don't start with <b>/</b>). 
<p>
Relative file paths are relative to the root of the external storage media
(usually SD). So, for example, <code>pics/me.jpg</code> might resolve
to <code>/sdcard/pics/me.jpg</code>.
</p>

</a><a name="loctears.html">

<h2>
	Location Without Tears
	<img style="float:right" src="./Tasker for Android_files/icon_tasker.png">
</h2>


</a><p><a name="loctears.html">
This is an overview guide to choosing a method for fixing your location with Tasker. At the end are
some </a><a href="#adv">advanced power-saving strategies</a>.
</p>

<h2>Power / Accuracy Comparison</h2>

<table cellpadding="5">
<tbody><tr>
	<th align="left">Method</th>			<th>Power Usage</th> <th>Acc</th> <th>Need Net</th> <th>Need Wifi</th>
</tr>

<tr>
	<td><a href="#cell">State: Cell Near</a></td>		<td>*</td> 		<td>*</td>   <td></td> <td></td>
</tr>

<tr>
	<td><a href="#net">Location: Net</a></td>		<td>**</td> 		<td>**</td> <td>Y</td><td></td>
</tr>

<tr>
	<td><a href="#netwifi">Location: Net &amp; Wifi</a></td><td>***</td> <td>*/*****</td> <td>Y</td> <td>Y</td>
</tr>

<tr>
	<td><a href="#near">State: Wifi Near</a></td>	<td>****</td> 		<td>*****</td> <td></td> <td>Y</td>
</tr>

<tr>
	<td><a href="#gps">Location: GPS</a></td>		<td>*****</td> 		<td>*****</td> <td>Y</td> <td></td>
</tr>

</tbody></table>

<p>
More stars mean higher power usage or higher accuracy (Acc).
</p>

<h2>Detail Comparison</h2>

<a name="net">
<h3>State: Cell Near</h3>

<h5>Setup</h5>

Create a state context, select Phone then Cell Near. Click Update and walk around a bit to scan for cell towers nearby.

<h5>About</h5>

Uses information about the cell towers the phone uses for telephony to record and match a location.

<p>
When the display is off, frequency of checks is controlled by <b>Menu / Prefs / Monitor / Display Off All Checks</b>.
</p>
<p>If your profile keeps deactivating, go back to the Cell Near state and click the magnifying glass icon to check
for cells you may have missed in your scan.
</p>

<h5>Plus / Minus</h5>

<ul>
	<li>(+) virtually no extra power on top of power needed for normal phone service
	</li><li>(+) when the display is on, context updates as soon as the tower is visible
	</li><li>(+) when the display is off, only one check period is needed to determine context exit
	</li><li>(-) highly inaccurate
	</li><li>(-) must be physically at the location in order to record it
</li></ul>


</a><a name="net">
<h3>Location: Net</h3>

<h5>Setup</h5>

Create a location context, and deselect GPS.

<h5>About</h5>

<p>
Net location accuracy varies greatly. It's <b>very important</b> that you create a <b>large radius</b> around
the spot you wish to detect.
</p>
<p>
Frequency of checks is controlled by <b>Menu / Prefs / Monitor / Network Location Check</b> (screen on)
and <b>Menu / Prefs / Monitor / Display Off All Checks</b>.
</p>

</a><a href="#loccontext.html">More Info</a>.

<h5>Plus / Minus</h5>

<ul>
	<li>(+) extremely low (extra) power (IF network is available anyway)</li>
	<li>(-) requires network and phone service</li>
	<li>(-) highly inaccurate and variable fixes</li>
</ul>

<a name="netwifi">
<h3>Location: Net &amp; Wifi</h3>

<h5>Setup</h5>

Create a location context and deselect GPS. Make sure your device's Wifi is turned on
when you want a more accurate location fix.

<h5>About</h5>
<p>
Net location can be assisted by nearby access points when Wifi is turned on (Google has
a map of APs for many areas).
</p>

<p>Turn Wifi off when not needed to conserve power e.g. use a Time context to turn wifi off at night.</p>
<h5>Plus / Minus</h5>

<ul>
    <li>(+) very good accuracy in built-up areas for relatively low power usage
   	</li><li>(-) must be physically at the location in order to record it
</li></ul>

</a><a name="near">
<h3>State: Wifi Near</h3>

<h5>Setup</h5>

Create a <b>State context</b>, click <b>Wifi Near</b>, fill in the SSID of an Access Point (AP)
with the best signal near where you want to identify.

<h5>About</h5>

Wifi Near does regular Wifi Scans and will activate when it recognizes an AP you have configured
is nearby. Note: you don't have to connect to the AP. You could configure e.g. the neighbours AP
if the signal is strong enough.

<p>
Check the <b>Wifi Toggle</b> box if you don't want wifi on all the time. It will then
be toggled when Tasker needs to do a scan.
</p>

<h5>Plus / Minus</h5>

<ul>
    	<li>(+) very good accuracy and reliability
     	</li><li>(+) less power than GPS
     	</li><li>(+) works indoors too
     	</li><li>(-) need an AP nearby
</li></ul>

</a><a name="gps">
<h5>Location: GPS</h5>

<h5>Setup</h5>

Create a location context, and deselect Net.

<h5>About</h5>

<p>
Frequency of GPS checks is controlled by <b>Menu / Prefs / Monitor / GPS Check</b> (screen on)
and <b>Menu / Prefs / Monitor / Display Off All Checks</b>. Higher frequencies mean
more battery usage but that location changes will be noticed more quickly.
</p>

<p>
When indoors, GPS will try a long time to get a signal, using a lot of battery. Adjust
it at <b>Menu / Prefs / Monitor / GPS Timeout</b>. Make the
timeout as low as you can until you start losing effectiveness.
</p>


</a><a href="#loccontext.html">More Info</a>.

<h5>Plus / Minus</h5>

<ul>
	<li>(+) highly accurate in the open air</li>
	<li>(-) functions very poorly or not at all indoors. A bad side effect is that if you enter a building e.g. office while between the check times, it may never detect 
your new location until you leave.
	</li><li>(-) extreme power usage
	</li><li>(-) needs network to get a first fix
</li></ul>

<a name="adv">
<h3>Advanced Strategies</h3>

<h5>Multiple Contexts</h5>

Tasker does not check high-power contexts until all lower-power contexts in the same profile are active.
You can use this to reduce power consumption. For instance, if you use the Wifi Near state to 
detect coming home, you could add a Location: Net context to the same profile, so that wifi scanning
will only take place when you are in the right neighbourhood.

<h5>Location Control</h5>

Disable GPS/Net location when they're not needed by creating a separate profile with e.g. a Time context which disables GPS during the night.

<p>
This works because Location contexts assume you are in the same location until there is a fix which says otherwise.
</p>




</a><a name="matching.html">

<h2>
	Pattern Matching
	<img style="float:right" src="./Tasker for Android_files/icon_tasker.png">
</h2>

<h3>What's Pattern Matching ?</h3>

With Pattern Matching, you specify a <i>pattern</i> which tells Tasker what text you wish
to match. For instance, if you want to match any telephone number starting with <b>0135</b>, you
can specify the simple match <b>0135*</b>. <b>*</b> is a special character which <i>matches</i>
any number of any character.

</a><p><a name="matching.html">
Tasker has two type of matching, </a><a href="#simple">Simple Matching</a> and more advanced <a href="#regex">Regex Matching</a>.

<a name="simple">
</a></p><h3><a name="simple">Simple Matching</a></h3><a name="simple">

Simple matching is designed to be easy for non-technical people to use.

<h4>Where's It Used ?</h4>

Simple Matching is used in the following places:

<ul>
	<li>in the <b>If</b> condition of an action, when the <b>~</b> (match) or <b>!~</b> (not match) operators
	are specified.
	</li><li>in text paremeters of State and Event contexts</li>
	<li>some other places :-)
</li></ul>

<h4>Matching Rules</h4>

<ul>
	<li>if a pattern is left blank, it will match against anything
	</li><li>if it is not blank it must match the whole target text
	</li><li><b>/</b> means 'or', it divides up multiple possible matches
	</li><li>a <b>*</b> will match any number of any character. It's not possible to specifically
		match a <b>*</b> character.
	</li><li>a <b>+</b> will match one or more of any character. It's not possible to specifically
	match a <b>+</b> character.<br>Beware: the condition '%var matches +' will be <b>true</b>
	if %var has not been assigned a value, because Tasker does not replace variables which
do not have a value.
	</li><li>matching is case-insensitive (<i>magic</i> will match with <i>MagiC</i>)
	<b>unless</b> the pattern contains an upper-case letter e.g. <i>Magic*</i> will
	not match against <i>magically</i>, but it will match against <i>Magic Roundabout</i>
	</li><li>a <b>!</b> at the very start of a match means <b>not</b> e.g. <i>!*Magic*/*Yellow*</i> matches anything <b>not</b>
	containing the words <i>Magic</i> or <i>Yellow</i></li>
	<li>it is not possible to specifically match a <b>!</b> character at the start of a target (but you could
	 use <b>*!</b>
	
</li></ul>
<p></p>
<p>Examples
</p>
<ul>
	<li><i>help</i> matches <i>help</i> but not <i>helper</i>.
	</li><li><i>help*</i> matches <i>helper</i>
	</li><li><i>*the*</i> matches <i>the</i> (anywhere)
	</li><li><i>123+</i> matches <i>123</i> and minimally one more character
	</li><li><i>+</i> matches anything with at least one character (non-empty)
	</li><li><i>the*way</i> matches <i>the other way</i> and <i>the first way</i>, amongst others
	</li><li><i>Help/*shell</i> matchs <i>Help</i> or anything ending with <i>shell</i>, case-sensitively
</li></ul>

</a><a name="caller">
<h4>Caller Matching</h4>

Caller matching (some events and states e.g. <i>Incoming Call</i>) is handled slightly differently.

<ul>
	<li><i>C:ANY</i> matches the telephone number of any contact
	</li><li><i>C:FAV</i> matches the telephone number of any favourite (starred) contact
	</li><li><i>Otherwise:</i> otherwise a match is attempted using the general matching rules
	against <b>both</b> the caller phone number and the associated contact's name (if there
	is one).
</li></ul>

<p>Examples:</p>

<ul>
	<li><i>!C:ANY</i> matches a number <b>not</b> belonging to a contact
	</li><li><i>077*/Geoff*</i> matches a number starting with <i>077</i> or belonging to a contact
	 whose names starts with <i>Geoff</i>
	 </li><li><i>C:FAV/0123456789</i> matches any favourite contact or the telephone number <i>0123456789</i>
</li></ul>

</a><a name="regex">
<h3>Regular Expression Matching</h3>

Regular expressions are similar to simple matching patterns but have many more features
and are much harder for non-technical people.

<h4>Where's It Used ?</h4>

Regex Matching is available:

<ul>
	<li>in the <b>If</b> condition of an action, when the <b>~R</b> or <b>!~R</b> operators
	are specified.
	</li><li>in the <i>Variable Search Replace</i> action
	</li><li>in the condition of a <i>Variable Value</i> state
</li></ul>

<h4>Matching Rules</h4>

Standard Java regular expression matching is applied. The Android Developer site has a
</a><a href="http://developer.android.com/reference/java/util/regex/Pattern.html">reference page</a>.

<a name="maths.html">

<h2>
	Maths
	<img style="float:right" src="./Tasker for Android_files/icon_tasker.png">
</h2>

<h4>Where Is Maths Used ?</h4>

<ul>
	<li>When you do <code>Variable Set</code> and click the <i>Do Maths</i> checkbox
	</li><li>With the <code>If</code> action, if you select a mathematical comparison like <b>&lt;</b> or <b>=</b>
	</li><li>With individual action conditions when a mathematical comparison is selected
</li></ul>

<h4>What's Available</h4>

Tasker uses the </a><a href="http://www.softwaremonkey.org/Code/MathEval">MathEval</a> library by Lawrence PC Dol.

<h4>Operators</h4>

<ul>
	<li><b>+ - * /</b> - the basic operators
	</li><li><b>%</b> - modulus
	</li><li><b>^</b> - power
</li></ul>

<h5>Constants</h5>

 <ul>
    <li><b>E</b>                  - the base of the natural logarithms
    </li><li><b>EUL</b>              - Euler's Constant
    </li><li><b>LN2</b>                - log of 2 base e
    </li><li><b>LN10</b>               - log of 10 base e
    </li><li><b>LOG2E</b>              - log of e base 2
    </li><li><b>LOG10E</b>             - log of e base 10
    </li><li><b>PHI</b>                - the golden ratio
    </li><li><b>PI</b>                 - the ratio of the circumference of a circle to its diameter
</li></ul>

<h5>Functions</h5>

Functions take their argument in parenthesis e.g. sin(90) 
<ul>

    <li><b>abs</b>           - absolute value
    </li><li><b>acos</b>          - arc cosine; the returned angle is in the range 0.0 through pi
    </li><li><b>asin</b>          - arc sine; the returned angle is in the range -pi/2 through pi/2
    </li><li><b>atan</b>          - arc tangent; the returned angle is in the range -pi/2 through pi/2
    </li><li><b>cbrt</b>          - cube root
    </li><li><b>ceil</b>          - smallest value that is greater than or equal to the argument and is an integer
    </li><li><b>cos</b>           - trigonometric cosine
    </li><li><b>cosh</b>          - hyperbolic cosine
    </li><li><b>exp</b>           - Euler's number e raised to the power of the value
    </li><li><b>expm1</b>         - <i>e</i><super>x</super>-1
    </li><li><b>floor</b>         - largest value that is less than or equal to the argument and is an integer
    </li><li><b>getExp</b>  	     - unbiased exponent used in the representation of val
    </li><li><b>log</b>           - natural logarithm (base e)
    </li><li><b>log10</b>         - base 10 logarithm
   </li><li><b>log1p</b>         - natural logarithm of (val+1)
    </li><li><b>nextup</b>        - floating-point value adjacent to val in the direction of positive infinity
    </li><li><b>round</b>         - closest 64 bit integer to the argument
    </li><li><b>roundhe</b>       - double value that is closest in value to the argument and is equal to a mathematical integer, using the half-even rounding method.
    </li><li><b>signum</b>        - signum function of the argument; zero if the argument is zero, 1.0 if the argument is greater than zero, -1.0 if the argument is less than zero
    </li><li><b>sin</b>           - trigonometric sine
    </li><li><b>sinh</b>          - hyperbolic sine
    </li><li><b>sqrt</b>          - correctly rounded positive square root
    </li><li><b>tan</b>           - trigonometric tangent
    </li><li><b>tanh</b>          - hyperbolic tangent
    </li><li><b>todeg</b>     	- converts an angle measured in radians to an approximately equivalent angle measured in degrees
    </li><li><b>torad</b>     	- converts an angle measured in degrees to an approximately equivalent angle measured in radians
    </li><li><b>ulp</b>           - size of an ulp of the argument
</li></ul>


<a name="power.html">

<h2>
	Power
	<img style="float:right" src="./Tasker for Android_files/icon_tasker.png">
</h2>

Internally, Tasker does its best to keep power usage down. Following are some macro-strategies to
achieve this.

<h4>Context Monitoring</h4>

<p>
When a profile contains multiple contexts, power is saved by only monitoring for changes in order of
the least-power-hungry first. For example, in a profile with a Time and App context, Tasker will not
decide that it needs to monitor for a changing application unless the Time context is active (because the
profile cannot become active until both contexts are active).
</p>

<p>Tasker rates contexts for power-hungriness in the following (ascending) order:
</p>
<ul>
	<li>Other State
	</li><li>Day / Time
	</li><li>Calendar Entry State
	</li><li>Cell Near State
	</li><li>App
	</li><li>Network Location
	</li><li>Wifi Near State
	</li><li>GPS Location
	</li><li>Proximity Sensor / Gesture Event / Orientation State (accelerometer activation)
</li></ul>

<p>
Items at the bottom of the list won't become eligible for monitoring until all items further up the
list are active.
</p>

<h4>Display-Off Checks</h4>

When the display is off, all necessary 'active' checks (GPS/Net Location, Wifi Near, App) are done at
the same time so that the device is awake for as short a time as possible. See <i>Display Off Timings</i>
in <code>Menu / Prefs / Monitor</code> for the frequency and maximum duration of these checks.

</a><a name="settings.html">

<h2>
	Settings
	<img style="float:right" src="./Tasker for Android_files/icon_tasker.png">
</h2>

<h4>What's A Setting ?</h4>

Settings are actions like <i>Display Brightness</i> and <i>Ringer Volume</i>
whose effects are reversed by Tasker when the profile(s) which applied them 
are no longer active.
<p>
Settings have a cog icon next to them. Normal actions have a lightning bolt.
</p>

<h4>Single Profile</h4>

When a setting is applied by the profile's Enter Task, its value is restored
after the profile becomes inactive again. For example, if
the ringer volume is at 7 and is set to 0 in the Enter Task,
when the profile becomes inactive it is automatically set back to 7.
<p>
In other words, settings are only valid for the lifetime of their profiles.
</p>

<h4>Multiple Profiles</h4>

When multiple profiles that affect a setting are active simultaneously:
<ol>
	<li>the setting has the value from the <b>most recently activated</b> profile
	</li><li>when <b>all</b> profiles are inactive, the setting has the value from before
	<b>any</b> profile was active
</li></ol>

<h4>Special Cases</h4>

<ul>
	<li>if a setting is changed by the Exit Task the profile will never save the setting's initial value.
	</li><li>settings changed in an <i>instant profile</i> (one with an event context or repeating/non-ranged time context)  remain changed after the
	event. The reasoning is that there is no point in changing the setting for the
	half-second that the event lasts.
</li></ul>
	
<h4>Notes</h4>

<ul>
	<li>settings are not <i>actively</i> maintained. If something else changes the setting
	once the Enter task has run, it's not the case that this is detected and the
	Enter task value automatically reapplied.
</li></ul>
Complicated, huh ?

</a><a name="variables.html">
<h2>
	Variables
	<img style="float:right" src="./Tasker for Android_files/icon_tasker.png">
</h2>

<h4>General</h4>

A variable is a named value which changes over time e.g. the level of the battery, the time of day.

<p>
When Tasker encounters a variable name in a text, it replaces the name with
the current value of the relevant variable before carrying out the action.
</p>
<p>
The main purposes of variables are:

</p></a><ul><a name="variables.html">
	<li><i>dynamic binding</i>: doing something with an action with data which
	is unknown when the task is created e.g. respond to an SMS; the sender
	is not known until the SMS is received.
	</li></a><li><a name="variables.html">allow </a><a href="#flowcontrol.html">flow control</a> within and
	between tasks
	</li><li>record data for some future use e.g. passing data between tasks
</li></ul>


<h4>Built-In Variables</h4>

The values of Built-In variables are updated by Tasker. Their names always
use all-capital letters.

<ul>
	<li><b>Airplane Mode Status</b><br> <code>(dynamic)</code><br> 
	<i>%AIR</i><br>
	Whether Airplane Mode is <b>on</b> or <b>off</b>

	</li><li><b>Airplane Radios</b><br> 
	<i>%AIRR</i><br>
	A comma-separated list of the radios which will be <b>disabled</b> when entering Airplane Mode.<br>
	Common radio names are: <i>bluetooth, cell, nfc, wifi, wimax</i>.

	</li><li><b>Battery Level</b> 
	<br><i>%BATT</i> <br>
	Current device battery level from 0-100.

	</li><li><b>Bluetooth Status</b> 	<code>(dynamic)</code><br>
	<i>%BLUE</i> <br>
	Whether Bluetooth is on or off.<br>

	</li><li><b>Calendar List</b><br>
	<i>%CALS</i><br>
	Newline-separated list of calendars available on the device.
	<br>Each entry is in the format <i>calendarprovider:calendarname</i>.<br>
	Example usage:
	<pre>	Variable Set, %newline, \n
	Variable Split, %CALS, %newline
	Flash, %CALS(#) calendars, first one is %CALS(1)</pre>
	For the sign <i>\n</i>, press carriage-return on the keyboard.
	</li><li><b>Calendar Event Title / Descr / Location</b>
	<i>%CALTITLE / %CALDESCR / %CALLOC</i><br>
	The title, description and location of the <b>current</b> calendar event, if there is one. If there are multiple current calendar events the
	variables refer to the <b>shortest</b>.
	<br>Tip: find other details about the current event(s) using the <code>Misc / Test</code> action, specifying %TIMES for the data.

	</li><li><b>Call Name / Number/ Date / Time (In)</b> <code>(dynamic, monitored)</code><br>
	<i>%CNAME / %CNUM / %CDATE / %CTIME</i><br>
	The caller name, number, date and time of the current (if a call is in progress) or last call received.<br>
	Caller number is <b>0</b> if it's unknown.<br>
	Caller name is <b>?</b> if it's unknown (probably because the caller number was blocked)
	and set to the caller number if the contact couldn't be looked up.
	It's unavailable on Android versions prior to 2.0.

	</li><li><b>Call Name / Number/ Date / Time / Duration (Out)</b><code>(dynamic, monitored)</code><br>
	<i>%CONAME / %CONUM / %CODATE / %COTIME / %CODUR</i><br>
	The called name, number, date and time of the last (<b>not</b> the current) outgoing call made.<br>
	Called Name	is set to the called number if the contact couldn't be looked up.
	It's unavailable on Android versions prior to 2.0.

	</li><li><b>Cell ID</b> <code>(dynamic,monitored)</code>
	<br><i>%CELLID</i><br>
	The current cell tower ID if known.<br>
	If you are using a Cell Near state, note that sometimes the Cell Near state will stay active
	even though %CELLID reports that the tower ID is unknown or invalid; that is because Cell Near only
	responds to valid IDs to prevent the state becoming inactive e.g. due to a service interruption.

	</li><li><b>Cell Signal Strength</b> <code>(dynamic,monitored)</code>
	<br><i>%CELLSIG</i>
	<br>
	The current phone signal level from 0-8 inclusive on a rougly linear scale. On some CDMA phones, the level will rise in steps of 2 (0,2,4,6,8). The value is -1 if the value
	is unknown or there is e.g. no service.
	<br>
	There is a bug with some Android versions that the reported signal strength is not updated until the 
	device is turned off and on.

	</li><li><b>Cell Service State</b> <code>(dynamic,monitored)</code>
	<br><i>%CELLSRV</i><br>
	The current phone service state. One of <i>unknown, service, noservice, emergency, nopower</i>.

	</li><li><b>Clipboard Contents</b><br>
	<i>%CLIP</i> <br>
	The current contents of the system clipboard.

	</li><li><b>CPU Frequency</b><br>
	<i>%CPUFREQ</i> <br>
	The current frequency CPU 0 is running at.  See also: <a href="#cpu.html">CPU Control</a>.

	</li><li><b>CPU Governor</b><br>
	<i>%CPUGOV</i> <br>
	The current governor controlling the frequency of CPU 0. See also: <a href="#cpu.html">CPU Control</a>.

	</li><li><b>Date</b> 
	<br><i>%DATE</i> <br>
 	Current human-readable date.
	
	</li><li><b>Day of the Month</b> 
	<br><i>%DAYM</i> <br>
	Current Day of the Month, starting at 1.

	</li><li><b>Day of the Week</b> 
	<br><i>%DAYW</i> <br>
	Current Day of the Week starting with Sunday.

	</li><li><b>Device ID / Manufacturer / Model / Product</b>
	<br><i>%DEVID / %DEVMAN / %DEVMOD / %DEVPROD</i><br>
	The ID, manufacturer, model and product name of the device. <br>Note: ID is <b>not</b> a unique
	identifier for the device, but rather for the hardware of the device. See also: %DEVTID.

	</li><li><b>Device Telephony ID</b>
	<br><i>%DEVTID</i><br>
	Returns the unique telephony-based ID for the device (e.g. for GSM the IMEI, for CDMA the
	MEID or ESN). <br>Not available on all devices.

	</li><li><b>Display Brightness</b>
	<i>%BRIGHT</i> <br>
	Current screen brightness, 0-255. On some devices, if the Android setting Auto Brightness is enabled, the
	value will always be 255.

	</li><li><b>Display Timeout</b>
	<i>%DTOUT</i> <br>
	Current system screen timeout (seconds).

	</li><li><b>Email From / Cc / Subject / Date / Time</b> <code>(dynamic)</code><br>
	<i>%EFROM / %ECC / %ESUBJ / %EDATE / %ETIME</i><br>
	The From, Cc, Subject, Received Date and Received Time of the last email received
	by the K9 email agent.

	</li><li><b>Free Memory</b><br>
	<i>%MEMF</i><br>
	System free memory remaining in MB.

	</li><li><b>GPS Status</b><br> (monitored,dynamic Gingerbread+)
	<i>%GPS</i><br>
	Whether the system GPS receiver is <b>on</b> or <b>off</b>.

	</li><li><b>HTTP Response Code / Data / Content Length</b><br> <code>(dynamic)</code>)
	<i>%HTTPR / %HTTPD / %HTTPL</i><br>
	Values from the last HTTP POST/GET action.<br>
	If the server doesn't return a content length, %HTTPL will be calculated from the returned
	data where possible.

	</li><li><b>Input Method</b><br>
	<i>%IMETHOD</i><br>
	The current active input method. Consists of 4 parts separated by commas: Method Name, SubType Name, Mode, Locale.
	<br>To access particular parts, use the <i>Variable Split</i> action.

	</li><li><b>Keyguard Status</b><br>
	<i>%KEYG</i><br>
	Whether the Keyguard is <b>on</b> or <b>off</b>

	</li><li><b>Last Application</b><br>
	<i>%LAPP</i><br>
	The name of the application that was in the foreground before the current one e.g. Maps.

	</li><li><b>Last Photo</b><br>
	<i>%FOTO</i><br>
	The filesystem path to the last photo taken by Tasker or the
	standard system camera application.

	</li><li><b>Light Level</b> <code>(dynamic,monitored)</code>
	<br><i>%LIGHT</i><br>
	The last recorded light level in lux.<br>Note that Android does not return a value until the light
	level changes, so to test the sensor is working you should put it near a bright light initially.
	<br>May not change when the device display is off, see <code>Menu / Prefs / More / Display Off Monitoring / Light Sensor</code>.

	</li><li><b>Location</b> <code>(dynamic)</code>  
	<br><i>%LOC</i><br>
	The latitude and longitude of the last GPS fix.
	<br><a href="#locnote">See note</a>.

	</li><li><b>Location Accuracy</b> <code>(dynamic)</code>
	<br><i>%LOCACC</i><br>
	The accuracy in metres of the last GPS fix.
	<br><a href="#locnote">See note</a>.

	</li><li><b>Location Altitude</b> <code>(dynamic)</code>
	<br><i>%LOCALT</i><br>
	The altitude in metres of the last GPS fix, or 0 if unavailable.
	<br><a href="#locnote">See note</a>.
	
	</li><li><b>Location Speed</b> <code>(dynamic)</code>
	<br><i>%LOCSPD</i><br>
	The speed in metres/second at the last GPS position fix or 0 if unavailable.
	<br><a href="#locnote">See note</a>.
	
	</li><li><b>Location Fix Time Seconds</b>  <code>(dynamic)</code>
	<br><i>%LOCTMS</i><br>
	The time in seconds of the last GPS fix. To get age of fix, take this away from %TIMES.
	<br>This value is not set until an offset of the GPS time from the fixed time has
	been calculated (should be after the first GPS fix) because the value is meaningless
	until that point.
	<br><a href="#locnote">See note</a>.
	
	</li><li><b>Location (Net)</b> <code>(dynamic)</code>
	<br><i>%LOCN</i><br>
	The latitude and longitude of the last network location fix.
	<br><a href="#locnote">See note</a>.
	
	</li><li><b>Location Accuracy (Net)</b> <code>(dynamic)</code>
	<br><i>%LOCNACC</i><br>
	The accuracy in metres of the last network location fix.
	<br><a href="#locnote">See note</a>.
	
	</li><li><b>Location Fix Time (Net)</b> <code>(dynamic)</code>
	<br><i>%LOCNTMS</i><br>
	The time in seconds of the last net location fix. To get age of fix, take this away from %TIMES.
	<br><a href="#locnote">See note</a>.
	
	</li><li><b>Magnetic Field Strength</b> <code>(monitored,dynamic)</code>
	<br><i>%MFIELD</i><br> 

	The total magnitudes in micro-Teslas of the magnetic fields acting on all three axis of the devices sensor.
	<br>Updated once per second.<br>See Also: state <code>Magnetic Field</code>.

	</li><li><b>Music Track</b> <code>(dynamic)</code>)
	<br><i>%MTRACK</i><br>
	The current playing music track, supported for:<ul>
		<li>Tasker actions <i>Music Play</i> and <i>Music Play Dir</i>
		</li><li>Built-in Android music-player, probably not on all devices however
		</li><li>Power AMP
		</li><li>BeyondPod (Tasker v1.2.1+)
		</li><li>Phantom Music Control Pro
	</li></ul>
	Priority: if both Tasker and one of the other supported apps are playing simultaneously, the
	non-Tasker track will be shown. If more than one of the other supported apps is playing 
	simultaneuosly, behaviour is unspecified.
	<br>Notes:<ul>
		<li> if you don't have a supported player, you could try Phantom Music Control Pro, which supports a lot of
		players and should pass the info on to Tasker
		</li><li>pausing a track clears the variable, unpausing sets it again
		</li><li>your music player may need an option enabled in order to broadcast the track information, or 
		the broadcast may only be available in a 'pro' version
	</li></ul>

	</li><li><b>Muted</b>
	<br><i>%MUTED</i><br>
	Whether the microphone is currently muted (<b>on</b>) or not (<b>off</b>).

	</li><li><b>Night Mode</b> 
	<br><i>%NIGHT</i><br>
	The current Android Night Mode.<br>
	One of <b>on</b>, <b>off</b> or <b>auto</b>.<br>
	If <b>auto</b>, Android will decide whether it should be in Night Mode itself.

	</li><li><b>Notification Title</b> <code>(monitored, dynamic)</code>
	<br><i>%NTITLE</i><br>
	The title of the last notification shown in the status bar. Requires Tasker's accessibility server
	to be running (see Android Accessibility Settings). Notifications generated by Tasker are not shown.
	Notifications for some apps will not register i.e. the variable will be blank.
	<br>Not available on Cupcake.

	</li><li><b>Phone Number</b>
	<br><i>%PNUM</i><br> 

	The current phone number of the device, if it's in service.<br>
	On some phones it doesn't work (Android limitation), seems related to the type of SIM.

	</li><li><b>Pressure</b> <code>(monitored,dynamic)</code>
	<br><i>%PRESSURE</i><br> 

	The current air pressure on the device in millibars.
	<br>May not change when the device display is off, see <code>Menu / Prefs / Monitor / Display Off Monitoring / Pressure Sensor</code>.

	</li><li><b>Profiles Active</b> 	<code>(dynamic)</code>
	<br><i>%PACTIVE</i><br> 

	A comma-separated list of the currently active, named profiles in activation order. Duplicate
	names will appear on the list only once. The list always starts and ends with a comma 
	to make matching easier, if it's not empty.
	
	</li><li><b>Profiles Enabled</b> <code>(dynamic)</code>
	<br><i>%PENABLED</i><br>
	
	A comma-separated list of the currently enabled, named profiles in creation order. Duplicate
	names will appear on the list only once. The list always starts and ends with a comma 
        to make matching easier, if it's not empty.

	</li><li><b>Roaming</b>
	<br><i>%ROAM</i><br>
	<b>on</b> if device is roaming on the current telephone network, otherwise <b>off</b>.

	</li><li><b>Root Available</b>
	<br><i>%ROOT</i><br>
	<b>yes</b> if root functions are available on this device, otherwise <b>no</b>.

	</li><li><b>Screen</b> 	<code>(dynamic)</code>
	<br><i>%SCREEN</i><br>
	Whether the screen is on (value <b>on</b>) or off (value <b>off</b>).

	</li><li><b>SDK Version</b>
	<br><i>%SDK</i><br>
	The numeric Android <a href="http://developer.android.com/reference/android/os/Build.VERSION_CODES.html">SDK version</a>
	of the device.

	</li><li><b>Silent Mode</b> <code>(dynamic)</code>
	<br><i>%SILENT</i><br>
	The current state of silent mode: <b>off</b>, <b>vibrate</b> or <b>on</b>.

	</li><li><b>SIM Serial Number</b>
	<br><i>%SIMNUM</i><br>
	The serial number of the SIM card, if one is present and accessible.
	<br>If the SIM has not been unlocked it will not be available.

	</li><li><b>SIM State</b>
	<br><i>%SIMSTATE</i><br>
	The current state of the SIM card.<br>
	One of <b>unknown</b>, <b>absent</b>, <b>pinrequired</b>, <b>pukrequired</b>, <b>netlocked</b> or <b>ready</b>.

	</li><li><b>Speakerphone</b>
	<br><i>%SPHONE</i><br>
	Whether the speakerphone is <b>on</b> or <b>off</b>
	
	</li><li><b>Speech</b> <code>(dynamic)</code>
	<br><i>%SPEECH</i><br>
	The current utterance as a result of a <i>Say</i> or <i>Say File</i> action, if applicable.
	
	</li><li><b>Task Queue Seconds</b> <code>(dynamic)</code>
	<br><i>%QTIME</i><br>
	The number of seconds since the current task first started executing.
	Note that tasks can be interrupted by higher priority tasks, so this number
	is not necessarily the total run-time of the task.

	</li><li><b>Tasks Running</b> <code>(dynamic)</code>
	<br><i>%TRUN</i><br>
	A comma-separated list of any named tasks which are currently running. The list always starts
	 and ends with a comma to make matching easier, if it's not empty.


	</li><li><b>Telephone Network</b> <code>(dynamic, monitored)</code>
	<br><i>%TNET</i><br>

	The current telephony network operator the device is using.
	<br>May be unreliable on CDMA networks

	</li><li><b>Text From/Date/Subject/Time</b> <code>(monitored)</code>
	<br>
	<i>%SMSRF / %SMSRN / %SMSRB / %MMSRS / %SMSRD / %SMSRT</i><br>
	The sender address, name, body, subject, date and time of the last text (SMS or MMS) received.
	<br>These variables will be empty until the first time a text is received after
	they have been referenced because Tasker does not monitor texts unless it's needed.<br>
	<i>Name</i> is set to sender address of no contact could be looked up.
	It's unavailable on Android versions prior to 2.0.
	<br><i>Body</i> (%SMSRB) is only set for SMSs.
	<br><i>Subject</i> (%MMSRS) is only set for MMSs.

	</li><li><b>Time</b> 
	<br><i>%TIME</i> <br>
	Current human-readable time separated by a period e.g. 10.59

	</li><li><b>Time MilliSeconds</b> 
	<br><i>%TIMEMS</i><br>
	The current time in milliseconds.<br> (milliseconds since some time in January, 1970, if you must know).

	</li><li><b>Time Seconds</b> 
	<br><i>%TIMES</i><br>
	The current time in seconds.<br> (seconds since some time in January, 1970, if you must know).

	</li><li><b>UI Mode</b> <code>(dynamic,monitored)</code>
	<br><i>%UIMODE</i><br>
	The current Android UI mode.<br>
	One of <b>car</b>, <b>desk</b> or <b>normal</b>.

	</li><li><b>Uptime Seconds</b> 
	<br><i>%UPS</i><br>
	The number of seconds since the device last booted.

	</li><li><b>Volume - Alarm/Call/DTMF/Media/Notification/Ringer/System</b> <code>(dynamic)</code><br>
	<i>%VOLA / %VOLC / %VOLD / %VOLM / %VOLN / %VOLR / %VOLS</i><br>
	Current audio channel volume level.<br>
	On some devices, volume changes are not picked up dynamically, on others not
	when using the phone app.

	</li><li><b>WiFi Info</b><br>
	<i>%WIFII</i><br>
	When connected to an Access Point (AP), shows human-readable data about the AP. When not connected,
	show details of the most recent Wifi scan results for nearby APs.

	</li><li><b>WiFi Status</b> 	<code>(dynamic)</code><br> 
	<i>%WIFI</i><br>
	Whether WiFi is <b>on</b> or <b>off</b>.
	Note: if WiFi is enabling or disabled, in fact anything but enabled, it's classed as off.

	</li><li><b>Wimax Status</b> <br>
	<i>%WIMAX</i><br>
	Whether Wimax is <b>on</b> or <b>off</b>.
	Note: if Wimax is enabling or disabled, in fact anything but enabled, it's classed as off.

	</li><li><b>Window Label</b> <code>(monitored)</code><br>
	<i>%WIN</i><br>
	The label of the current window, which could be a full-screen activity or a dialog. 
	<br>Not set if the label is unknown.
	<br>For some windows, the label might be that of the first item in the window e.g. a menu entry or even a button.
</li></ul>

<h5>General Notes</h5>

<p>
Variables marked <code>dynamic</code> in the list above trigger changes in <i>Variable Value</i> states
and <i>Variable Set</i> events whenever their value changes.
</p>

<p>
Variables marked <code>monitored</code> will cause the relevant monitor to startup to track their state
when they are used in contexts or tasks which are used by widgets or <b>enabled</b> profiles. 
For instance, %CELLS used in a Flash action will cause cell location to be tracked.
</p>
<p>
Limitation: monitored variables cannot be detected in anonymous shortcuts.
</p>

<a name="locnote">
<h5>Note On Location Variables</h5>

<p>
When the relevant provider (Net or GPS) of a location context is active, these variables report the values from the provider,
which may be more recent than Tasker has seen if other applications are asking for location.
</p>
<p>
When the relevant provider is <b>not</b> active, these variables report the last values <b>seen by Tasker</b>,
which could be the result of a <code>Get Location</code> action or of monitoring for a <code>Location Context</code>.
</p>
<p>
That means the the reported fix times could <b>go backwards</b>, if you turn off the location provider
between two uses of the variables.
</p>

<p>
Location variables can also be manually updated by running the <code>Get Location</code> action.
</p>

<h4>User Variables</h4>

The action <i>Variable Set</i> (and several others) can be used to create new variables. Variable names have the following restrictions:

<ul>
	<li>they must start with the <b>%</b> character
	</li><li>they are case-sensitive
	</li><li>then must at least a further <b>3</b> alphanumeric characters
	</li><li>they can also contain the underscore character (_) but not start or end with it
</li></ul>

<h5>Global vs Local Variables</h5>

All built-in variables are <i>global</i>, meaning they are <b>visible anywhere</b> in Tasker (e.g. %WIFI)
<p></p>
<p>
User variables which have one or more capital letters in their name are
also global (e.g. %Car)
</p>
<p>
However, user variables which have <b>all-lower-case</b> names (e.g. %fruit) are <i>local</i>, meaning they are only visible <b>in the task in which they are used</b> (or the scene in which they are used, if the task was launched from by a scene event).
</p>
<p>In general, it's best to use local variables wherever possible because:

</p><ul>
<li>you know they won't be interfered with by other tasks
</li><li>they are more efficient in several ways
</li></ul>
<p>
Note: multiple copies of the same task running at the same time each have their own separate copy of their local variables.
</p>

<h5>Escaping Variable Names</h5>

If you want to prevent a variable name being replaced, put a <b>\</b> in front of it e.g.

<blockquote>
<code>Variable Set, %new, \%old</code>
</blockquote>

Will set the value of <i>%new</i> to <i>%old</i>, <b>not</b> the <b>value</b> of <i>%old</i>.
<p>In order to precede a variable name with a <b>\</b> you can escape the backslash e.g.
</p><p>

</p><blockquote>
<code>Variable Set, %new, \\%old</code>
</blockquote>

Will set the value of <i>%new</i> to <b>\</b> followed by the <b>value</b> of <i>%old</i>.

<h5>Variable Lifetime</h5>

The value a variable holds should last until Tasker is uninstalled if
it is not changed by any task.

<h5>Uninitialized Variables</h5>

<p>
User-variables which have not had a value assigned do not have replacements carried out e.g. in the expression <i>I love %fruit</i>, if
%fruit is uninitialized, the expression remains as it is, otherwise %fruit is replaced with the value.
</p>
<p>
Exception: uninitialized variables used in mathematical expressions are replaced with 0.
</p>

<h4>Variables In Plugins</h4>

Plugin developers can tell Tasker to replace variables
it finds in plugin strings with their current Tasker value. If you have a plugin
which doesn't support this, send the developer this URL

</a><blockquote><a name="locnote">
</a><a href="http://tasker.dinglisch.net/plugins.html">http://tasker.dinglisch.net/plugins.html</a>
</blockquote>

<p>
which has the relevant details.
</p>

<a name="arrays">
<h4>Variable Arrays</h4>

Tasker supports pseudo-arrays.
<p>
They are especially useful when used with the <code>For</code> action, since you can
perform a set of actions on each element in turn e.g. list a set of files then 
test each one.
</p>

<h5>Examples</h5>

<p>
If the four variables <b>%arr1, %arr2, %arr3, %arr4</b> hold respectively <b>a, b, c</b> and <b>d</b>
then we have an array with 4 <i>elements</i>.
These variables can be used just like any other, however it is also possible to access
them in special ways. Here are some examples:
</p>
<ul>
	<li><b>%arr(#)</b><br>
	The number of defined array elements (<b>4</b> in this case)
	</li><li><b>%arr(#&gt;)</b><br>
	The index of the first defined array element, or <b>0</b> if none are defined (<b>1</b>).
	</li><li><b>%arr(#&lt;)</b><br>
	The index of the last defined array element, or <b>0</b> if none are defined (<b>4</b>)
	</li><li><b>%arr(#?b/c)</b><br>
	A comma-separated list of the array indices (lowest to highest) with matching values, or <b>0</b> if none match (<b>2,3</b> in the example)
	</li><li><b>%arr(&gt;)</b><br>
	The contents of the first defined array element (<b>a</b>)
	</li><li><b>%arr(&lt;)</b><br>
	The contents of the last defined array element (<b>d</b>)
	</li><li><b>%arr()</b> or <b>%arr(:)</b><br>
	All of the array elements separated by commas (<b>a,b,c,d</b>)
	</li><li><b>%arr(2)</b> or just <b>%arr2</b><br>
	The content of the element with index 2 (<b>b</b>)
	</li><li><b>%arr(2:4)</b><br>
	Contents of defined elements with indices 2 to 4 (<b>b,c,d</b>)
	</li><li><b>%arr(:3)</b><br>
	All the defined elements with indices up to 3 (<b>a,b,c</b>)
	</li><li><b>%arr(3:)</b><br>
	All the defined elements with indices starting from 3 (<b>c,d</b>)
	</li><li><b>%arr(1:2)</b><br>
	All the defined elements with indices from 1 to 2 (<b>a,b</b>)
</li></ul>

Notes:

<ul>
<li>arrays will virtually always have all their elements defined so e.g. %arr(&gt;) will be the same as %arr(1), %arr(#) will be the same as %arr(#&lt;)
</li><li>index specifiers can themselves be variables (e.g. %arr(1:%MAX) or %arr(#?%FINDME))
</li></ul>

<h5>Creating An Array</h5>

<ol>
	<li>using <code>Variable Split</code>:<br>
	<b>Variable Set %arr a,b,c,d</b><br>
	<b>Variable Split %arr</b><br>
	If your data has commas in it, you can separate the values with e.g. @ and specify @ also in the
	<code>Variable Split</code> action.
	</li><li>by assigning individual elements with <code>Variable Set</code>:<br><b>Variable Set, %arr3, c</b>.
	</li><li>using <code>Array Push</code> to add an initial element
	</li><li>some other actions also create arrays for their results e.g. <code>List Files</code>.
</li></ol>

<h5>Inserting Elements</h5>

Use the <code>Array Push</code> action.

<p>
The <i>Fill Spaces</i> parameter might need more explanation. It is only relevant if one or more of the array elements are undefined. As an example, if we have the array elements %arr1 and %arr3 containing <b>apple</b> and <b>banana</b>:
</p>
<ul>
<li><b>Array Push %arr1, 1, pear</b><br>leaves %arr1, %arr2 and %arr4 containing <b>pear</b>, <b>apple</b> and <b>banana</b>.<br>
</li><li>but <b>Array Push %arr2, 1, pear, Fill Spaces</b><br>leaves %arr1, %arr2 and %arr3 containing <b>pear</b>, <b>apple</b> and <b>banana</b>.
</li></ul>

<h5>Removing Elements</h5>

<p>
Use the <code>Array Pop</code> action. Note the difference between <code>Array Pop</code> and <code>Variable Clear</code>: 
<code>Pop</code> reduces the number of elements in the array, while <code>Clear</code> merely changes elements to undefined.
</p>

<p>
Example: if we have the array elements %arr1, %arr2, %arr3 containing <b>apple</b>,<b>pear</b> and <b>banana</b>:
</p>
<ul>
<li><b>Variable Clear %arr2</b><br>leaves %arr1 and %arr3 containing <b>apple</b> and <b>banana</b>.<br>
</li><li>but <b>Array Pop %arr2</b><br>leaves %arr1 and %arr2 containing <b>apple</b> and <b>banana</b>.
</li></ul>

<h5>Deleting An Array</h5>

Use <code>Array Clear</code>.<p>In most cases you could also use <b>Variable Clear %arr*</b> with Pattern Matching checked,
but that would also delete variables called e.g. %arrTOODEETOO so <code>Array Clear</code> is safer.</p>

<h5>Array Efficiency</h5>

Arrays are intended for convenience when processing high-level data, not for e.g.
processing astronomical data.  Doing thousands of array actions will likely
take several seconds (although mostly due to the housekeeping work done by Tasker
in-between each action rather than due to the array operations themselves).
<p></p>
<p>
In terms of storage efficiency, they are also fairly hopeless. You probably do not
want to store tens of thousands of items in an array.
</p>


<h2>
        FAQ: How Do I... / Can I... ?
        <img align="right" src="./Tasker for Android_files/androidlogo.png">
        <img align="right" src="./Tasker for Android_files/icon_tasker.png">
</h2>

</a><ul><a name="arrays">
	</a><li><a name="arrays"></a><a href="#z">How can I contact the developer ?
	</a></li><li><a href="#x">How can I send the developer a short-term log ?
	</a></li><li><a href="#x2">How can I send the developer a long-term log ?
	</a></li><li><a href="#a">Can I change an app's settings / press it's buttons ?</a>
	</li><li><a href="#o">Can I control / respond to events in application X with Tasker ?</a>
	</li><li><a href="#cx">How can I stop Tasker restoring a setting ?</a>
	</li><li><a href="#c">Can Tasker detect volume button presses ?</a>
	</li><li><a href="#d">Can Tasker be used from the SD card (apps2sd) ?</a>
	</li><li><a href="#e">Can I use Tasker to turn the screen on and off ?</a>
	</li><li><a href="#f">How do I create my default settings ?</a>
	</li><li><a href="#g">How can I run more than one task when a profile goes active ?</a>
	</li><li><a href="#h">Can I hide the notification list entry when Tasker is running ?</a>
	</li><li><a href="#h2">Can I change or remove the status bar icon when Tasker is running ?</a>
	</li><li><a href="#i">What if I want a repeating time context, but I need to do something that takes a while ?</a>
	</li><li><a href="#j">How can I do something every minute ?</a>
	</li><li><a href="#k">How do I specify <i>9:30AM on Monday</i> and <i>10AM on Tuesday</i> with the same profile ?</a>
	</li><li><a href="#k2">How do I specify weekend night-times ?</a>
	</li><li><a href="#l">How do I stop the screen dimming when I have the display Stay On set to e.g. 'With AC' ?</a>
	</li><li><a href="#m">How can I stop Wifi Near toggling wifi on-off when the phone is in Airplane Mode ?</a>
	</li><li><a href="#n">Can I divert incoming calls ?</a>
	</li><li><a href="#p">How can I detect if Wifi is connected (not just enabled) ?</a>
	</li><li><a href="#q">How can I import/export individual profiles, tasks or scenes ?</a>
	</li><li><a href="#s">How do I turn off the flashing notification LED ?</a>
	</li><li><a href="#t">How do I put my phone in Silent or Vibrate mode ?</a>
	</li><li><a href="#u">Can I automate sending of an SMS / Call through Google Voice ?</a>
	</li><li><a href="#v">Can I change/remove the notification sounds for particular apps ?</a>
	</li><li><a href="#v2">Can I silence all notifications except from particular applications ?
	</a></li><li><a href="#w">Can I change the input method ?</a>
	</li><li><a href="#y">How do I test whether I can reach the Internet (ping) ?</a>
	</li><li><a href="#y2">How can I use whitespace (newline, tab etc) in action parameters ?</a>
</li></ul>

<hr>

<!-------------------------------------------------------------------->

<a name="z">
<h4>How can I contact the developer ?</h4>

There is a contact email given at <b>Menu / Info / User Support</b>. In
general, this is intended for order and validation help, which is
often confidential, and other private issues.

</a><p><a name="z">
Please post Tasker usage queries/problems in the </a><a href="http://groups.google.com/group/tasker">Tasker Forum</a> where the developer is very active.
</p>

<p>Advantages:
</p><ul>
	<li>the user community has more experience than the developer with using Tasker
	</li><li>other people can benefit if your problem is solved
	</li><li>the developer has more time for fixing bugs and adding features, which benefits everyone
</li></ul>

<!-------------------------------------------------------------------->
<a name="x">
<h4>How can I send the developer a short-term log ?</h4>

If your problem covers a short time-frame (arond 5-10 minutes) e.g. a crash

<ul>
	<li>download aLogcat, free from Play Store
	</li><li>deselect <b>Menu / Prefs / UI / Beginner Mode</b> in Tasker
	</li><li>enable <b>Menu / Prefs / Misc / Debug to System Log</b> in Tasker
	</li><li>do whatever it is that causes the problem
	</li><li>go to aLogCat, click <b>Menu / Pause</b> then <b>Menu / Send</b>
	</li><li>the destination email is listed in <b>Menu / Info / User Support</b> in Tasker
	</li><li>include at the top a brief description of the problem that the email concerns
</li></ul>

<p>
Try to make the log as soon as possible after the problem occurs.
</p>

<!-------------------------------------------------------------------->
</a><a name="x2">
<h4>How can I send the developer a long-term log ?</h4>

If your problem covers a longer time-frame, you'll need an SD card log because the
system log fills up very quickly:

<ul>
	<li>you'll need an SD card inserted
	</li><li>deselect <b>Menu / Prefs / UI / Beginner Mode</b> in Tasker
	</li><li>enable <b>Menu / Prefs / Misc / Debug to SD Card</b> in Tasker
	</li><li>when the problem has occured, email the file <i>/sdcard/Tasker/log.txt</i> to
	the developer email listed at <b>Menu / Info / User Support</b>
	</li><li>include at the top a brief description of the problem that the log concerns
</li></ul>

<!-------------------------------------------------------------------->

</a><a name="a">
<h4>Can I change an app's settings / press it's buttons ?</h4>

<p>
Standard Android doesn't allow an app to change, poke, prod or peek at anything within another app,
including simulating keypresses and screen taps.
</p>
<p>
On a rooted device, you can use some of the actions in the <code>Input</code>
category to navigate around an app, click on UI elements and enter text automatically.
</p>

<!-------------------------------------------------------------------->

</a><a name="o">
<h4>Can I control / respond to events in application X with Tasker ?</h4>

</a><p><a name="o">
If a Tasker user wants to automate some aspect of another program they use, they just need to point the developer of the other app at the </a><a href="#/developers.html">Tasker Developer Page</a> and nag at him/her a bit.
</p>

<!-------------------------------------------------------------------->

<a name="cx">
<h4>How can I stop Tasker restoring a setting ?</h4>

Tasker will restore any setting which is changed in the Enter
task of a profile.

There are four ways to prevent this:

<ol>
	<li>deselect the <i>Restore Settings</i> in the Profile Properties
of the relevant profile.
	</li><li>if you set the same setting in the Exit task of the profile
Tasker will take that as a hint that the previous value shouldn't be
restored.
	</li><li>create a separate task to run the settings actions and
in the Enter task of the profile do a Perform Task action
(from the category <i>Tasker</i>) on that separate task. This trick is
known as Stefan's Setting Sidestep.
	</li><li>you can use the corresponding Javascriptlet function 
instead of the setting action. Settings made in Javascriptlets are
not restored.
</li></ol>



<!-------------------------------------------------------------------->

</a><a name="c">
<h4>Can Tasker detect volume button presses ?</h4>

No, sorry, that's not possible ATM.
<p>
The closest you can get is to detect changes in a volume variable
(e.g. %VOLR for the ringer volume) via event Variable Set.
</p>


<!-------------------------------------------------------------------->
</a><a name="d">
<h4>Can Tasker be used from the SD card (apps2sd) ?</h4>

No, sorry, that's not possible for several reasons relating to how Tasker works.

<p>
It's <b>not</b> that the developer 'can't be bothered to do it', it's because it's not
possible.
</p>

<!-------------------------------------------------------------------->

</a><a name="e">
<h4>Can I use Tasker to turn the screen on and off ?</h4>

<p>
Turning on, use the Display / Turn On action. Unfortunately, that action
is inaccessible with Android 2.3+.
</p>

<p>
For turning off, you can use the Display / System Lock action with Android 2.0+.
</p>
<p>
For Android 1.6, you can set the Display Timeout to it's minimum (around 7 seconds)
and then set it back to normal in response to a Display Off event.
</p>

<!-------------------------------------------------------------------->

</a><a name="f">
<h4>How do I create my default settings ?</h4>

<p>
You don't have to configure 'default' settings in Tasker.
The 'default' settings are how your device is configured before any Tasker profile becomes
active. This 'default' is automatically restored as profiles become inactive.
</p>
<p>
Exception: changes to settings made in <i>Exit</i> tasks are not restored.
</p>

<!-------------------------------------------------------------------->

</a><a name="g">
<h4>How can I run more than one task when a profile goes active ?</h4>

Add an action <i>Perform Task</i> from the category <i>Tasker</i> for
each task that you want to run (don't click the Stop button).
<p>
<b>Warning:</b>: settings in the called tasks will not be restored by Tasker,
only settings changed directly within the Enter task.
</p>

<!-------------------------------------------------------------------->
</a><a name="h">
<h4>Can I hide the notification list entry when Tasker is running ?</h4>

If the notification is very annoying, it can be removed
by disabling the Run In Foreground setting which can be found
in Menu-&gt;Preferences-&gt;Monitor.
<p>
	Please read the help text associated with this option first.
</p>

<!-------------------------------------------------------------------->
</a><a name="h2">
<h4>Can I change or remove the status bar icon when Tasker is running ?</h4>

You can change it with <b>Menu / Prefs / Monitor / Notification Icon</b>.
<p>
To remove it, select the first icon in the dialog (it's transparent).
</p>

<!-------------------------------------------------------------------->

</a><a name="i">
<h4>What if I want a repeating time context, but I need to do something that takes a while ?</h4>

<ul>
<li>GPS On
</li><li>Wait 3 minutes
</li><li>GPS Off
</li></ul>

<!-------------------------------------------------------------------->

</a><a name="j">
<h4>How can I do something every minute ?</h4>

<p>
Set a repeat period of 2 minutes (the minumum allowed) and specify a task
like this:
</p>
<ul>
	<li>Perform Task, TaDa
	</li><li>Wait 1 Minute
	</li><li>Perform Task, TaDa
</li></ul>


<!-------------------------------------------------------------------->

</a><a name="k">
<h4>How do I specify 9:30AM on Monday and 10AM on Tuesday with the same profile ?</h4>

<p>
You can't, because the Time and Day subcontexts operate completely independent of
each other. You have to specify two profiles and run the same Task(s) with each of
them (by giving the task a name).
</p>

</a><a name="k2">
<h4>How do I specify weekend night-times ?</h4>

It's tempting to say:

<blockquote><code>
	Time: 23 - 09<br>
	Day: Friday or Saturday
</code></blockquote>

<p>
But that won't work, because on Sunday at e.g. 3am the Day context (and hence the
whole profile) won't be active.
</p>
<p>
For this kind of situation, you need to specify a profile for which morning you want
to be active and another for which evenings. In the example, you want Friday and
Saturday night plus Saturday or Sunday morning:
</p>
<blockquote><code>
	Time: 23 - 24<br>
	Day: Friday or Saturday
</code></blockquote>
<blockquote><code>
	Time: 00 - 09<br>
	Day: Saturday or Sunday
</code></blockquote>

<!-------------------------------------------------------------------->

</a><a name="l">
<h4>How do I stop the screen dimming when I have the display Stay On set to e.g. 'With AC' ?</h4>

The screen dims around 10 seconds before the current Screen Off Timeout value is
reached. You can set Screen Timeout (for the relevant context e.g. 'while docked')
to <b>Never</b> (set all sliders to maximum) if you don't like that behaviour.

<!-------------------------------------------------------------------->

</a><a name="m">
<h4>How can I stop Wifi Near toggling wifi on-off when the phone is in Airplane Mode ?</h4>

Add a state <b>Airplane Mode</b> to your profile and click the <b>Invert</b> button, which
means <i>if Airplane Mode is off</i>.

<!-------------------------------------------------------------------->

</a><a name="n">
<h4>Can I divert incoming calls ?</h4>

It's not possible to divert incoming calls via Android, but most Mobile Carriers accept special dialled
sequences to do it before the call reaches your phone.
<p>
You can then use Tasker's <i>Phone / Call</i> action (with <i>Auto Dial</i> checked) to setup
and cancel incoming call diversions.
</p>

</a><p><a name="n">
The </a><a href="http://en.wikipedia.org/wiki/Call_forwarding">Wikipedia page on Call Forwarding</a> is a good starting point.
</p>

<!-------------------------------------------------------------------->
<a name="p">
<h4>How can I detect if Wifi is connected (not just enabled) ?</h4>

The 'standard' way is to use State <i>Wifi Connected</i> to set and clear your own variable with
an enter and exit task respectively.

<p>
An alternative trick is to match the word <code>connected</code> or <code>connection</code> in the %WIFII variable (the actual word and lower/upper case changes with Android version).
</p>

<!-------------------------------------------------------------------->
</a><a name="q">
<h4>How can I import/export individual profiles, tasks or scenes ?</h4>

<p>
Import:
</p>
Go to the main screen, long click on the tab for the type of thing you want to import.


<p>
Export: 
</p><ul>
<li>ensure that <code>Menu / Prefs / UI / Beginner Mode</code> is <b>un</b>checked
</li><li>go to the main screen 
</li><li>long-click on the thing you want to export
</li></ul>

<!-------------------------------------------------------------------->
</a><a name="s">
<h4>How do I turn off the flashing notification LED ?</h4>

Use the Audio / Notification Pulse action.

<p>
If you're wondering what a flashing light is doing in the Audio section: ask Google,
that's where they put it in Android Settings.
</p>

<!-------------------------------------------------------------------->
</a><a name="t">
<h4>&gt;How do I put my phone in Silent or Vibrate mode ?</h4>

Use action <i>Audio / Silent Mode</i>.

<p>
Do not try to do it with <i>Volume Ringer</i> or <i>Vibrate on Ringer</i>.
</p>

<!-------------------------------------------------------------------->
</a><a name="u">
<h4>Can I automate sending of an SMS / Call through Google Voice ?</h4>

Not directly through Tasker. However, 
</a><a href="http://sites.google.com/site/steelgirderdevelopmentsite/home">Steelgirder Developments</a> have
(non-free) plugins which you can easily use with Tasker to accomplish this.

<p>
Steelgirder and the author of Tasker are agreed on working together wherever further
integration of these plugins and Tasker is needed e.g. support for Tasker variables.
</p>

<!-------------------------------------------------------------------->
<a name="v">
<h4>Can I change/remove the notification sounds for particular apps ?</h4>

Yes, but it's a little complicated, please see the 
</a><a href="http://groups.google.com/group/tasker/browse_thread/thread/4a6b6ea8b4e4cc86">relevant forum post</a>.

<!---------------------------------------------------------------------->
<a name="v2">
<h4>Can I silence all notifications except from particular applications ?</h4>

With Tasker versions from 1.0.10, you can try turning off all notifications 
(e.g. via Silent Mode or setting the Notification Volume to 0) and then
using Tasker to do alerts for particular app notifications using the
<code>Notification</code> event in the UI category.

<!-------------------------------------------------------------------->
</a><a name="w">
<h4>Can I change the input method ?</h4>

On a rooted phone, yes, using the free Secure Settings plugin.

</a><p><a name="w">
Consider also starring this </a><a href="http://code.google.com/p/android/issues/detail?id=11677">feature request</a> with Google.
</p>

<!-------------------------------------------------------------------->
<a name="y">
<h4>How do I test whether I can reach the Internet (ping) ?</h4>

<pre><code>
  HTTP Get URL (a known webpage), Continue Task On Error
  If [ %HTTPR = 200 ]
     ...
  Endif
</code>
</pre>

<!-------------------------------------------------------------------->
</a><a name="y2">
<h4>How can I use whitespace (newline, tab etc) in action parameters ?</h4>

Tasker trims the start and end of all parameters to prevent whitespace causing problems.
The only exception is the <code>Variable Set</code> action. 
<p>
Therefore, if you want to use whitespace you should first assign it to a variable and then
use the variable where you want the whitespace to appear:

</p><blockquote><code>
Variable Set, %white, THISISANEWLINE<br>
Flash, Here's a newline: %white
</code></blockquote>

<!-------------------------------------------------------------------->
</a><a name="y3">
<h4>How can I run a task from a terminal login ?</h4>

<pre>am broadcast -a net.dinglisch.android.tasker.ACTION_TASK -e task_name YOUR_TASK_NAME
</pre>

<p>
That's only possible on a rooted phone because otherwise there will be a permission problem.
</p>

<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h2>
        FAQ: Usage Problems
        <img align="right" src="./Tasker for Android_files/androidlogo.png">
        <img align="right" src="./Tasker for Android_files/icon_tasker.png">
</h2>

</a><ul><a name="y3">

</a><li><a name="y3"></a><a href="#0">Why won't Android let me uninstall Tasker ?</a>
</li><li><a href="#a">Why doesn't the Kill App action work in Android 2.2 like it used to ?</a>
</li><li><a href="#c">Why isn't GPS coming on for my profile with Time And GPS Location contexts ?</a>
</li><li><a href="#d">Why can't I select Tasker for an application context ?</a>
</li><li><a href="#e">Why does it take my Wifi Near state so long to exit ?</a>
</li><li><a href="#f">Why isn't Tasker detecting when my Location Context changes ?</a>
</li><li><a href="#g">Why does Tasker mess up the app launching when I have an Application Context for it ?</a>
</li><li><a href="#h">Why does my profile not do anything ?</a>
</li><li><a href="#w">Why aren't my settings restored ?</a>
</li><li><a href="#i">Why does nothing happen when I click a Tasker widget ?
</a></li><li><a href="#j">Why does Tasker crash when I try to create a Location Context ?</a>
</li><li><a href="#k">Why can't I see any Tasker widgets in the home screen widget selector ?</a>
</li><li><a href="#l">Why doesn't my repeating Time Context work ?</a>
</li><li><a href="#m">Why aren't my exit tasks run / settings restored before the device shuts down ?</a>
</li><li><a href="#n">Why does my location exit task fire multiple times ?</a>
</li><li><a href="#o">Why does my Cell Near state keep going inactive ?</a>
</li><li><a href="#p">Why doesn't Notify LED work ?</a>
</li><li><a href="#q">Why do Tasker widgets disappear after a reboot on my Wildfire ?</a>
</li><li><a href="#r">Why isn't my docking station detected ?</a>
</li><li><a href="#s">Why aren't I getting any cell data for the Cell Near state ?</a>
</li><li><a href="#t">Why isn't there a green light for the On/Off radio button on the main screen ?</a>
</li><li><a href="#u">Why does the action Display Brightness cause my keyboard or application to close ?</a>
</li><li><a href="#v">Why is the date in Tasker's notification list completely wrong ?</a>
</li><li><a href="#w">Why won't Tasker install on my custom ROM ?</a>
</li><li><a href="#x">Why doesn't my <code>Perform Task</code> action work when I Test it ?</a>
</li><li><a href="#app">Why doesn't my App Context work ?</a>
</li></ul>

<hr>

<!----------------------------------------------------------------------------->

<a name="0">
<h4>Why won't Android let me uninstall Tasker ?</h4>

It's probably because you're using an action which needs Tasker's device administrator function (e.g. <code>Display / System Lock</code>).
<p>
You can disable it by going to <code>Android Settings / Location &amp; Security / Device Administration</code>.
</p>


<!----------------------------------------------------------------------------->

</a><a name="a">
<h4>Why doesn't the Kill App action work in Android 2.2 like it used to ?</h4>

Google decided that the feature was being abused and causing more problems
than it solved and it was therefore watered down.
<p>
From Tasker version 1.0.21 it's more effective again if you have a rooted device.
</p>

<!----------------------------------------------------------------------------->

</a><a name="c">
<h4>Why isn't GPS coming on for my profile with Time And GPS Location contexts ?</h4>

In order to save power, Tasker only activates context detection as it is needed.
Therefore it will not attempt to fix your GPS location unless the Time context is
active.
</a><p><a name="c">
See the </a><a href="#userguide/en/power.html">Power Usage</a> section of the userguide
for more details.
</p>

<!----------------------------------------------------------------------------->

<a name="d">
<h4>Why can't I select Tasker for an application context ?</h4>

This is considered too dangerous. A mistake could easily result in being unable
to enter Tasker and therefore being unable to rectify the mistake.

<!----------------------------------------------------------------------------->

</a><a name="e">
<h4>Why does it take my Wifi Near state so long to exit ?</h4>

<p>
Wifi Near requires <b>two</b> check periods to pass without seeing the Access Point before the
profile exits. This is intended to avoid the context activating and deactivating if the
AP is briefly not visible.
</p>
<p>
Note also that there are different check periods for when the device is on or off, and by default
the off-period is much longer than the on-period. See Menu / Preferences / Monitor/ Display On/Off Timings.
</p>


<!----------------------------------------------------------------------------->

</a><a name="f">
<h4>Why isn't Tasker detecting when my Location Context changes ?</h4>

<p>
Your radius is probably too small.
</p><p>
</p><p>
As an example, if you are not using GPS the accuracy of your fixes is probably
around += 2km, so your radius should be also minimally 2km.
</p>
<p>
If you *are* using GPS, the accuracy may still be only +-400m in built-up areas.
</p>
<p>Here's a good way to create a location context:
</p>
<ul>
        <li>go to the geographical location you want a context for
        </li><li>make a new location context
        </li><li>deselect GPS if you don't want to use it
        </li><li>press Grab Fix, and wait till it's done
</li></ul>

<p>
This will set your radius appropriate to the accuracy of the location providers at that spot.
</p>

<p>
If there's still nothing happening:
</p>

</a><ul><a name="f">
	<li>check GPS is on in Android Settings, if you're using GPS.
	</li><li>check your device has a view of the sky, if you're using GPS
	</li><li>network connectivity is often needed to get GPS started, and always needed for a Net location context.
	</li><li>realize that location is only checked every 10 minutes by default when the Display is off (to save power).
	You can check more often by changing <code>Menu / Prefs / Monitor / Display Off Timings / All Checks</code>
	</li></a><li><a name="f">try the </a><a href="#h">general 'nothing happens'</a> tips
	</li><li>look at <a href="#userguide/en/loctears.html">other possibilities for detecting your location</a>
</li></ul>

<!----------------------------------------------------------------------------->

<a name="g">
<h4>Why does Tasker mess up the app launching when I have an Application Context for
it ?</h4>
<p>
Some applications are sensitive like this. Probably all you have to do is put as the
first action in the <b>Enter</b> task the action <i>Wait</i> and give as a
parameter e.g. 300ms. If that doesn't work keep increasing the value until it does.
</p>
<p>
That gives the application time to finish initializing before messing around
with the screen brightness etc.
</p>

<!----------------------------------------------------------------------------->
</a><a name="w">
<h4>Why aren't my settings restored ?</h4>

Some possibilities:

<ul>
<li>if your profile sets setting x to <i>on</i>, then
if x is already <i>on</i> when the profile goes active, it will be left at <i>1</i> when the
profile exits. Test for this by putting an Alert / Notify action in the enter
task to see what the original value was.
</li><li>some other apps installed on the system can cause Tasker to be killed and
therefore the original settings being forgotten e.g. this has been reported to be
a problem with Titanium Backup.
</li><li>similarly, if the system is rebooted suddenly, some devices aren't fast enough
to save all the settings before the system turns off.
</li></ul>

<!----------------------------------------------------------------------------->

</a><a name="h">
<h4>Why does my profile not do anything ?</h4>

Firstly, if are you using any of these other apps which have been reported as interfering
try disabling or temporarily uninstalling them:

<ul>
	<li>'Task Killers'
	</li><li>Quick System Info
	</li><li>Autostarts
</li></ul>

<p>After that:</p>

</a><ul><a name="h">
<li>is the profile enabled ? It should have a green tick next to it.
</li></a><li><a name="h">have you clicked the <i>On</i> button in the </a><a href="#userguide/en/activity_summary.html">Profile List screen</a> before leaving Tasker ?
It should be showing a <b>green light</b>.
</li><li>is the profile shown as active in the status bar pulldown ? If so, it's probably your task that's not working.
</li><li>make sure the Monitor service running in the foreground (see <code>Menu / Prefs / Monitor</code>)
</li><li>how's your available memory, see <code>Android Settings / Application / Running Services / Available Memory</code>. Are you maybe getting
Tasker's low-memory notifications ?
</li></ul>

<p>
If your profile is activating but the task doesn't seem to do anything:
</p>

<ul>
<li>perhaps you are running a pirated version of Tasker ?
</li><li>try enabling <b>Menu / Prefs / More / Popup Warning/Errors</b> to see if any errors are occuring (they may not be shown till you go back to the Tasker UI)
</li><li>look in <b>Menu / More / Run Log</b> to see if the task is being carried out.
</li><li>try a simple task like <i>Alert / Vibrate</i> or <i>Alert / Flash</i>
</li><li>perhaps another profile is interfering: do <b>Menu / Data / Backup</b>, then delete all other profiles except the one that's not working
</li></ul>

<!----------------------------------------------------------------------------->

<a name="i">
<h4>Why does nothing happen when I click a Tasker widget ?</h4>

Usually this is due to Tasker not being enabled, see the <i>On/Off</i> button in the first UI screen.

<!----------------------------------------------------------------------------->
</a><a name="j">

<h4>Why does Tasker crash when I try to create a Location Context ?</h4>

The likely cause is that you are running a non-standard Android ROM which doesn't
contain the correct (or maybe any) Google Maps library.

<!----------------------------------------------------------------------------->
</a><a name="k">

<h4>Why can't I see any Tasker widgets in the home screen widget selector ?</h4>

This is almost always because you have Tasker installed on the SD card, which is just not
possible due to several reasons related to how Tasker works.

<!----------------------------------------------------------------------------->
</a><a name="l">

<h4>Why doesn't my repeating Time Context work ?</h4>

<p>
It's important to understand that a repeating time context is a <b>series of instant events</b>.
</p>

<p>Trying to combine a repeating time context with another context that does
active monitoring usually won't work e.g.

</p><blockquote><code>
	Time: Repeating Every 5 Minutes
<br>
	Task: Enable Wifi (no toggle)
</code></blockquote>
<blockquote><code>
	State: Wifi Near
<br>
	Task: XXX
</code></blockquote>

<p>
Wifi Near is checked on a static schedule. You currently can't change the schedule dynamically,
so the above two profiles will only do XXX when the 5 minute repeat happens to coincide with
when Tasker is doing it's Wifi Near check.
</p>

<!----------------------------------------------------------------------------->
</a><a name="m">

<h4>Why aren't my exit tasks run / settings restored before the device shuts down ?</h4>

Android gives an app very little time to perform cleanup during shutdown, this is especially
a problem on slow devices.

<p>
Therefore (as of 1.0.9), Tasker only attempts to run <i>Variable Set, Clear, Add</i> and <i>Subtract</i> actions
when the device shuts down, since they take relatively little time.
</p>
<p>
In the future, Tasker will have some concept of default values which will then be restored when
it starts after the device has booted again.
</p>
<p>
On Android 1.5 devices, Tasker cannot do anything at shutdown because the system does not send a notification.
</p>

<!----------------------------------------------------------------------------->
</a><a name="n">
<h4>Why does my location exit task fire multiple times ?</h4>

Probably the location Android reports is <i>bouncing</i> between a point inside
your location radius and one outside. This is relatively unusual because Tasker
has some built-in mechanisms to try and prevent it.

<p>
A quick fix is to add a <i>Cooldown</i> to your profile. Click on a context,
select Profile then Properties and slide the Cooldown Time to 30 minutes.
</p>
<p>
The profile is then prevented from going active more than once every 30 minutes.
</p>

<!----------------------------------------------------------------------------->
</a><a name="o">
<h4>Why does my Cell Near state keep going inactive ?</h4>

Even when your phone is motionless, it will probably still often switch between
different cell towers. Going to a different room in your house may involve
a whole different set of cell towers.

<p>
When you notice your Cell Near state going inactive at your location (and assuming
you still have a signal), launch Tasker, click on the Cell Near context and edit
it. Click <b>Scan</b> and you should immediately see a new Cell added to the list.
Click <b>Done</b> and then <b>Apply</b> and your context should go active again.
</p>

<p>
Sometimes the new cell will only be visible for a few seconds and will not appear
when you press scan. In that case, press the <b>Recent</b> button and
select it manually from the list.
</p>

</a><a name="p">
<h4>Why doesn't Notify LED work ?</h4>

From the action help (hint hint):

<ul>
	<li>not all devices support all colours. Many devices will only support red and green. In general, colours near the top of the list are more likely to be supported.
	</li><li>some devices will only flash the LED when the device is off at the time the notification is received.
</li></ul>

<!----------------------------------------------------------------------------->
</a><a name="q">
<h4>Why do Tasker widgets disappear after a reboot on my Wildfire ?</h4>

This is a bug on some Wildfire firmware version.

<p>It's not possible for the Tasker developer to
work around, but is reported as fixed in version 1.25.405.1 of the firmware.
</p>


<!----------------------------------------------------------------------------->
</a><a name="r">
<h4>Why isn't my docking station detected ?</h4>

Some docking stations just aren't recognized as such (Android doesn't indicate that
a docking station has been connected).

<p>
Depending on other things you connect your device to, you might be able to use one of
the following as a workaround:
</p>

<ul>
	<li>State: USB connected
	</li><li>State: Power
	</li><li>State: BT Connected (if it's a BT dock)
</li></ul>


<!----------------------------------------------------------------------------->
</a><a name="s">
<h4>Why aren't I getting any cell data for the Cell Near state ?</h4>

A user reports being able to fix this issue as follows:

<pre>I was able to fix this issue by going into the EPST menues using
##DATA# on the keypad and changing the EVDO Preferred mode from HDR to
Automatic.
</pre>

<p>
It's possible that you will only be able to receive, not make, phone
calls as another symptom of this problem.
</p>


<!----------------------------------------------------------------------------->
</a><a name="t">
<h4>Why isn't there a green light for the On/Off radio button on the main screen ?</h4>

A user discovered that this happens when the DPI value of the Android build is set to
particulart values (e.g. 200,240 is OK, 220 the light disappears).

<!----------------------------------------------------------------------------->
</a><a name="u">
<h4>Why does the action Display Brightness cause my keyboard or application to close ?</h4>

Normally Android does not effect changes to brightness immediately, so Tasker has to
use a trick to make it happen. That trick can sometimes have the side effect that 
e.g. some dialogs like the soft keyboard may close.

<p>
To avoid that, you can deselect the Immediate Effect checkbox in the Display Brightness action.
</p>

<!----------------------------------------------------------------------------->
</a><a name="v">
<h4>Why is the date in Tasker's notification list completely wrong ?</h4>

<p>
This occurs if you select a transparent <i>Notification Icon</i> at <code>Menu / Prefs / Monitor</code>,
but don't specify a <i>Custom Notification Layout</i>.
</p>
<p>
Changing to a non-transparent icon or a custom layout will fix the problem.
</p>

<!----------------------------------------------------------------------------->
</a><a name="w">
<h4>Why won't Tasker install on my custom ROM ?</h4>

The most likely reason is that you don't have Google Maps installed on the device. With
several custom ROMs that comes as a separate package.

<!----------------------------------------------------------------------------->
</a><a name="x">
<h4>Why doesn't my <code>Perform Task</code> action work when I Test it ?</h4>
 
<p>
When task (a) runs a <code>Perform Task</code> action to start task (b), the order in which the two tasks are executed depends on their relative priorities.
</p>
<p>
A feature of the Test button is that the tested task (a) runs at extremely high priority
to ensure that the task runs even if other tasks are running in the background.
</p>
<p>
So testing <code>Perform Task</code> with the Test button will only work as expected if in actual usage task (a) will always have higher priority than task (b) or the <code>Perform Task</code> action has <b>Stop</b> specified.
</p>

<!----------------------------------------------------------------------------->
</a><a name="app">
<h4>Why doesn't my App Context work ?</h4>

<p>Some apps (very few) aren't detected by Tasker, usually due to their internal structure.</p>
<p>Some custom Android ROMs also have special configurations which prevent Tasker's app detection working.</p>
<p>For the latter problem, there are a few things you can try:
</p>
<ul>
<li>look for special settings in your ROM that relate to 'keeping the launcher in memory'. They should be <b>disabled</b>.

</li><li>change the build properties file. Look in <code>/system/build.prop</code> (or possibly <code>/system/local.prop</code> or <code>/data/local.prop</code>) for a line like:
<blockquote>
ro.HOME_APP_ADJ=-17
</blockquote>

<p>Change it in a terminal program to look like this:</p>

<blockquote>
ro.HOME_APP_ADJ=1
</blockquote>

<p>If you didn't find an existing line, just add the new line as above.</p>

<p>Note: you will first need to make <code>/system</code> writeable. You can
do that e.g. with Tasker's <code>Remount</code> action. Remember to make it
not-writeable again after making the change.
</p>
</li><li>try detecting apps with a state using the <b>%WIN</b> (<i>window title</i>) variable; create a new state <blockquote><code>Variable Value, %WIN, Matches, TITLE</code></blockquote>where TITLE is the title of the window of the app you are interested in. For this solution to work, you also need to enable Tasker's <i>Accessibility Service</i> in Android Settings.
<p>
You can check what %WIN shows for the app you are interested in with this profile:
</p><blockquote>
	Event: Variable Set, %WIN<br>
	Alert / Flash, Win is now %WIN
</blockquote>

</li></ul>

<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>


<h2>
        FAQ: Why... ?
        <img align="right" src="./Tasker for Android_files/androidlogo.png">
        <img align="right" src="./Tasker for Android_files/icon_tasker.png">
</h2>

</a><ul><a name="app">
	</a><li><a name="app"></a><a href="#f">Why am I an idiot if I use a pirated copy of Tasker ?</a>
	</li><li><a href="#a">Why is GPS often scanning when I unlock my device ?</a>
	</li><li><a href="#b">Why does Tasker need so many permissions ?</a>
	</li><li><a href="#c">Why does Tasker need the INTERNET permission ?</a>
	</li><li><a href="#d">Why isn't Tasker shown in the Application Context list ?</a>
	</li><li><a href="#e">Why does Tasker have it's own music player <b>and</b> controls for the system music player ?</a>
	</li><li><a href="#g">Why does a Cell Near context not become inactive when I turn on Airplane Mode ?</a>
	</li><li><a href="#h">Why can't I use a downloaded icon for my shortcut task / Notify action ?</a>
	</li><li><a href="#i">Why does my profile have 2 enter tasks ? Why can't I add an exit task ?</a>
</li></ul>

<hr>

<!------------------------------------------------------------------------------->
<a name="f">
<h4>Why am I an idiot if I use a pirated copy of Tasker ?</h4>

The hacker can do virtually anything with your phone. Record your
calls and upload them to a website, SMS your location and all your
contacts, make calls automatically, wipe your SD card, secretely
record from your microphone any time etc etc

<!------------------------------------------------------------------------------->
</a><a name="a">
<h4>Why is GPS often scanning when I unlock my device ?</h4>

When the device wakes up, Tasker switches from a low-frequency GPS check schedule to a
higher-frequency one. Android's GPS software always does an immediate scan when
switching the check frequency.

<p>
It's not because Tasker is constantly scanning while the device is off
</p>

<p>
You can change the frequency in Menu / Prefs / Monitor.
</p>

<!------------------------------------------------------------------------------->

</a><a name="b">
<h4>Why does Tasker need so many permissions ?</h4>

Because it can do so much!

<p>
Unfortunately, Android requires that an app specify it's permissions even if they are
never used, which means that permissions for all of the things which the user could
<b>potentially</b> ask Tasker to do need to be specified.
</p>
<p>
If you are still concerned, consider that Tasker has over 25,000 downloads at the time of writing and any abuse taking place would quickly be discovered.
</p>

<!------------------------------------------------------------------------------->

</a><a name="c">
<h4>Why does Tasker need the INTERNET permission ?</h4>

The INTERNET permission is used solely for:

<ul>
	<li>google maps downloading map data, only for setting up a Location context
	</li><li>to carry out HTTP Post/Get actions and other actions that require an Internet connection by their nature
	</li><li>to verify the order number, and only until it has been successfully verified
	</li><li>to check whether a new Tasker version is available, if configured in Preferences
</li></ul>

<p>
Tasker never directly uses Internet access for <b>anything</b> else.
</p>

<!------------------------------------------------------------------------------->

</a><a name="d">
<h4>Why isn't Tasker shown in the Application Context list ?</h4>

Because it's easy to get into trouble firing tasks in Tasker. For example, if 
a profile is setup with a Tasker Application Context and a task with Load App Calculator,
it will not be possible to enter Tasker anymore.

<!------------------------------------------------------------------------------->

</a><a name="e">
<h4>Why does Tasker have it's own music player <b>and</b> controls for the system music player ?</h4>

<ul>
	<li>the system music player is not guaranteed to be present or the same on all systems.
	</li><li>finer control can be exercised over the Tasker player e.g. starting the track
	from a preset seek point
	</li><li>Tasker's player is more discrete, there is no notification bar icon.
	</li><li>by having two players available you can do things like alternating audio from different
	music sources or even playing simiultaneously.
</li></ul>

<!------------------------------------------------------------------------------->

</a><a name="g">
<h4>Why does a Cell Near context not become inactive when I turn on Airplane Mode ?</h4>

Cell Near is <i>sticky</i>. That means that once active it stays active until a non-matching
Cell ID is seen. In Airplane Mode no Cell IDs are seen and so the context stays active.

<p>
Many people use Airplane Mode at night e.g. to save battery. If you also have a Cell Near
profile that detects when you are home, it would become inactive at night if Cell Near wasn't
sticky.
</p>
A couple of points:
<ul>
	<li>the Cell radio isn't being turned on by Tasker in Airplane Mode.
	</li><li>if you want a profile to become inactive for Airplane Mode, just add an Inverted
	state Airplane Mode to it.
</li></ul>
</a><p><a name="g">


<!------------------------------------------------------------------------------->
</a><a name="h">
</a></p><h4><a name="h">Why can't I use a downloaded icon for my shortcut task / <code>Notify</code> action ?</a></h4><a name="h">

Some things just weren't meant to be (i.e. Android doesn't allow it).
<p>
To solve the shortcut problem, you can always use a widget though.
</p>

<p>
For notifications:
</p></a><ul><a name="h">
</a><li><a name="h">if you would like this to be possible one day, please star this
</a><a href="http://code.google.com/p/android/issues/detail?id=12302">Android feature request</a>
</li><li>it would be technically possible to create 'icon pack' APKs and that might happen one day
</li></ul>

<!------------------------------------------------------------------------------->
<a name="i">
<h4>Why does my profile have 2 enter tasks ? Why can't I add an exit task ?</h4>

That's because it's an </a><a href="#instant">instant</a> profile.

<p>
As a convenience, the Exit task with such profiles is replaced by an extra Enter task in case
you have a lot to do with that profile.
</p>

<p>
Note that the tasks you specify execute in the order they are specified, their actions
do not alternate.
</p>

<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>


<h2>
        FAQ: App Creation
        <img align="right" src="./Tasker for Android_files/androidlogo.png">
        <img align="right" src="./Tasker for Android_files/icon_tasker.png">
</h2>

<ul>
        <li><a href="#c">Does app creation support profiles ?</a>
        </li><li><a href="#a">Why is the app always shown as running ?</a>
        </li><li><a href="#b">How do I do initialization on the first launch ?</a>
        </li><li><a href="#d">Why isn't my app detecting background events ?</a>
	 </li><li><a href="#e">How can I send the developer a short-term App Factory log ?
</a></li></ul><a href="#e">

<!----------------------------------------------------------------------------->

</a><a name="c">
<h4>Does app creation support profiles ?</h4>

<p>
Sure. You can export projects as apps and projects can contain
profiles, tasks and scenes.
</p>
<p>
For help accessing projects, see <code>Menu / Info / Help This Screen</code>
in the main screen.
</p>

<!----------------------------------------------------------------------------->

</a><a name="a">
<h4>Why is the app always shown as running ?</h4>

<p>
Tasker tries to detect when it's monitor service is no longer needed but that is
not always possible. You can put a <code>Disable</code> action from the <code>Tasker</code>
category at the end of your launch task to ensure that it happens.
</p>

<p>
The monitor will be started again automatically each time the app is lauched from the home
screen.
</p>


<!----------------------------------------------------------------------------->
</a><a name="b">
<h4>How do I do initialization on the first launch ?</h4>

Setup your launch task something like this:

<pre><code>
If %LaunchCount = 0
   ...initialization actions...
Else
   ...normal actions...
Elsif
Variable Add, %LaunchCount, 1
</code></pre>

<!----------------------------------------------------------------------------->
</a><a name="d">
<h4>Why isn't my app detecting background events ?</h4>

One possible cause is: when an app has just been installed on Android it is in a 'frozen' state until
there is some user interaction with it (usually clicking the home screen icon
at least once).

<!-------------------------------------------------------------------->

</a><a name="e">
<h4>How can I send the developer a short-term App Factory log ?</h4>

<ul>
        <li>download aLogcat, free from Android Market
        </li><li>disable Tasker in the main screen bottom-left
        </li><li>in the App Config screen, check <i>Advanced Properties</i> and then <i>Debug</i>
        </li><li>create and install the new app *twice*
	</li><li>launch the new app from the home screen
	</li><li>reproduce whatever conditions cause the problem
        </li><li>go to aLogCat, click <b>Menu / Pause</b> then <b>Menu / Send</b>
        </li><li>the destination email is listed in <b>Menu / Info / User Support</b> in Tasker
        </li><li>include at the top a brief description of the problem that the email concerns
</li></ul>

<p>
Try to make the log as soon as possible after the problem occurs.
</p>

<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>


<h2>
        FAQ: Other
        <img align="right" src="./Tasker for Android_files/androidlogo.png">
        <img align="right" src="./Tasker for Android_files/icon_tasker.png">
</h2>

</a><ul><a name="e">
        </a><li><a name="e"></a><a href="#a">Do you plan to include feature X ?</a>
        </li><li><a href="#b">Should I worry about using Tasker's Accessibility service ?</a>
        </li><li><a href="#diff">What's the difference between a Widget and a Shortcut ?</a>
	</li><li><a href="#instant">What's an <i>Instant Profile</i> ?</a>
</li></ul>

<!----------------------------------------------------------------------------->

<a name="a">
<h4>Do you plan to include feature X ?</h4>

Please see the </a><a href="#todo.html">Plans</a> page.

<!----------------------------------------------------------------------------->
<a name="b">
<h4>Should I worry about using Tasker's Accessibility service ?</h4>

Not at all.

<p>
Although the Android warning says Tasker might read passwords, in fact:
</p>

<ul>
	<li>Android doesn't allow apps to see the contents of fields labelled <i>Password</i>
	</li><li>Tasker doesn't even ask Android for data about text fields, only buttons, windows
	and notifications
</li></ul>

<!----------------------------------------------------------------------------->
</a><a name="instant">
<h4>What's an <i>Instant Profile</i> ?</h4>

<p>
Most profiles have a duration. Their enter task fires, they are active for a while, then they go inactive and settings
may be restored or an exit task fired. However, profiles with
</p>

<ul>
    <li>an Event context, <b>or</b>
    </li><li>a Time context where the From parameter is the same as the To parameter, <b>or</b>
    </li><li>a Time context with a repeat value specified
</li></ul>

<p>
are only active for an instant and hence it does not make sense to talk about an exit task and restoration of settings.
</p>

<p>
There's no point setting brightness from 200 to 30, and then a millisecond later back to 200, 
therefore settings made by an instant profile stay at whatever value is specified.
</p>

<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>


</a></td>
</tr>
</tbody></table>


</td></tr></tbody></table></body></html>